63 lines
1.8 KiB
Dart
63 lines
1.8 KiB
Dart
import 'package:flutter/material.dart';
|
|
|
|
import '../../theme.dart';
|
|
import '../../size_config.dart';
|
|
|
|
class LoadingButton extends StatelessWidget {
|
|
const LoadingButton(
|
|
{Key? key,
|
|
required this.backgroundButtonColor,
|
|
required this.textButtonColor})
|
|
: super(key: key);
|
|
|
|
final Color backgroundButtonColor;
|
|
final Color textButtonColor;
|
|
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
final Brightness brightnessValue =
|
|
MediaQuery.of(context).platformBrightness;
|
|
bool isDarkMode = brightnessValue == Brightness.dark;
|
|
return SizedBox(
|
|
width: double.infinity,
|
|
height: getProportionateScreenWidth(44),
|
|
child: TextButton(
|
|
style: TextButton.styleFrom(
|
|
foregroundColor: Colors.black,
|
|
shape: RoundedRectangleBorder(
|
|
borderRadius:
|
|
BorderRadius.circular(getProportionateScreenWidth(10))),
|
|
backgroundColor: backgroundButtonColor,
|
|
),
|
|
onPressed: () {},
|
|
child: Row(
|
|
mainAxisAlignment: MainAxisAlignment.center,
|
|
children: [
|
|
Container(
|
|
width: 17,
|
|
height: 17,
|
|
child: CircularProgressIndicator(
|
|
strokeWidth: 2,
|
|
valueColor: AlwaysStoppedAnimation(
|
|
Color(0xffFFFFFF),
|
|
),
|
|
),
|
|
),
|
|
SizedBox(
|
|
width: getProportionateScreenWidth(6),
|
|
),
|
|
Text(
|
|
'Loading',
|
|
style: thirdTextStyle.copyWith(
|
|
fontSize: getProportionateScreenWidth(14),
|
|
fontWeight: semiBold,
|
|
color: baruTextutih,
|
|
letterSpacing: 0.3),
|
|
),
|
|
],
|
|
),
|
|
),
|
|
);
|
|
}
|
|
}
|