mirror of
https://github.com/revanced/revanced-manager
synced 2024-05-14 13:56:57 +02:00
46 lines
1.1 KiB
Dart
46 lines
1.1 KiB
Dart
import 'package:flutter/material.dart';
|
|
import 'package:flutter_i18n/flutter_i18n.dart';
|
|
import 'package:flutter_svg/flutter_svg.dart';
|
|
import 'package:google_fonts/google_fonts.dart';
|
|
|
|
class MagiskButton extends StatelessWidget {
|
|
final Function() onPressed;
|
|
|
|
const MagiskButton({
|
|
Key? key,
|
|
required this.onPressed,
|
|
}) : super(key: key);
|
|
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
return Column(
|
|
mainAxisSize: MainAxisSize.min,
|
|
children: <Widget>[
|
|
GestureDetector(
|
|
onTap: onPressed,
|
|
child: CircleAvatar(
|
|
radius: 32,
|
|
backgroundColor: Theme.of(context).colorScheme.secondary,
|
|
child: SvgPicture.asset(
|
|
'assets/images/magisk.svg',
|
|
color: Theme.of(context).colorScheme.surface,
|
|
height: 40,
|
|
width: 40,
|
|
),
|
|
),
|
|
),
|
|
const SizedBox(height: 8),
|
|
I18nText(
|
|
'rootCheckerView.grantPermission',
|
|
child: Text(
|
|
'',
|
|
style: GoogleFonts.poppins(
|
|
fontSize: 15,
|
|
),
|
|
),
|
|
),
|
|
],
|
|
);
|
|
}
|
|
}
|