You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
58 lines
1.5 KiB
Dart
58 lines
1.5 KiB
Dart
5 years ago
|
import 'package:doctor_app_flutter/config/size_config.dart';
|
||
|
import 'package:flutter/foundation.dart';
|
||
|
import 'package:flutter/material.dart';
|
||
|
|
||
|
import 'app_texts_widget.dart';
|
||
|
|
||
|
class AppButton extends StatefulWidget {
|
||
|
|
||
|
|
||
|
final GestureTapCallback onPressed;
|
||
|
final String title;
|
||
|
final IconData icon;
|
||
|
final Color color;
|
||
|
|
||
|
AppButton({@required this.onPressed, this.title, this.icon, this.color});
|
||
|
|
||
|
_AppButtonState createState() => _AppButtonState();
|
||
|
|
||
|
}
|
||
|
|
||
|
class _AppButtonState extends State<AppButton>{
|
||
|
@override
|
||
|
Widget build(BuildContext context) {
|
||
|
return
|
||
|
RawMaterialButton(
|
||
|
fillColor: widget.color,
|
||
|
splashColor: widget.color,
|
||
|
child: Padding(
|
||
|
padding: EdgeInsets.only(
|
||
|
top: 10,
|
||
|
bottom: 10,
|
||
|
right: SizeConfig.widthMultiplier * 15,
|
||
|
left: SizeConfig.widthMultiplier* 15
|
||
|
),
|
||
|
child: Row(
|
||
|
mainAxisSize: MainAxisSize.min,
|
||
|
children: <Widget>[
|
||
|
/*Icon(
|
||
|
widget.icon,
|
||
|
color: Colors.white,
|
||
|
),
|
||
|
SizedBox(
|
||
|
width: 10.0,
|
||
|
),*/
|
||
|
AppText(
|
||
|
widget.title,
|
||
|
color: Colors.white,
|
||
|
fontSize: SizeConfig.textMultiplier * 2.5,
|
||
|
fontWeight: FontWeight.bold,
|
||
|
),
|
||
|
],
|
||
|
),
|
||
|
),
|
||
|
onPressed: widget.onPressed,
|
||
|
shape: const StadiumBorder(),
|
||
|
);
|
||
|
}
|
||
|
}
|