2022-08-14 19:33:01 +05:30
|
|
|
import 'package:flutter/material.dart';
|
2022-09-02 14:35:25 +01:00
|
|
|
import 'package:flutter_i18n/flutter_i18n.dart';
|
2022-08-14 19:33:01 +05:30
|
|
|
import 'package:flutter_svg/flutter_svg.dart';
|
|
|
|
|
|
|
|
class MagiskButton extends StatelessWidget {
|
2022-08-18 15:33:33 +01:00
|
|
|
final Function() onPressed;
|
2022-09-01 11:16:14 +01:00
|
|
|
|
2022-08-14 19:33:01 +05:30
|
|
|
const MagiskButton({
|
|
|
|
Key? key,
|
2022-08-18 15:33:33 +01:00
|
|
|
required this.onPressed,
|
2022-08-14 19:33:01 +05:30
|
|
|
}) : super(key: key);
|
|
|
|
|
|
|
|
@override
|
|
|
|
Widget build(BuildContext context) {
|
|
|
|
return Column(
|
|
|
|
mainAxisSize: MainAxisSize.min,
|
2022-09-02 14:35:25 +01:00
|
|
|
children: <Widget>[
|
2022-08-14 19:33:01 +05:30
|
|
|
GestureDetector(
|
|
|
|
onTap: onPressed,
|
|
|
|
child: CircleAvatar(
|
|
|
|
radius: 32,
|
2022-09-05 03:32:36 +01:00
|
|
|
backgroundColor: Theme.of(context).colorScheme.primary,
|
2022-08-14 19:33:01 +05:30
|
|
|
child: SvgPicture.asset(
|
|
|
|
'assets/images/magisk.svg',
|
2022-09-01 01:25:19 +01:00
|
|
|
color: Theme.of(context).colorScheme.surface,
|
|
|
|
height: 40,
|
|
|
|
width: 40,
|
2022-08-14 19:33:01 +05:30
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
const SizedBox(height: 8),
|
|
|
|
I18nText(
|
|
|
|
'rootCheckerView.grantPermission',
|
2022-09-05 03:32:36 +01:00
|
|
|
child: const Text(
|
2022-08-14 19:33:01 +05:30
|
|
|
'',
|
2022-09-05 03:32:36 +01:00
|
|
|
style: TextStyle(fontSize: 15),
|
2022-08-14 19:33:01 +05:30
|
|
|
),
|
|
|
|
),
|
|
|
|
],
|
|
|
|
);
|
|
|
|
}
|
|
|
|
}
|