123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990 |
- import 'package:flutter/material.dart';
- class CancelButton extends StatelessWidget {
- final VoidCallback callback;
- final String content;
- final double width;
- final double height;
- final double fontSize;
- CancelButton({
- @required this.callback,
- @required this.content,
- this.width = double.infinity,
- this.height = 44,
- this.fontSize = 28,
- });
- @override
- Widget build(BuildContext context) {
- return InkWell(
- onTap: this.callback,
- child: Container(
- width: width,
- height: height,
- decoration: BoxDecoration(
- color: Color(0xffF1F1F1),
- borderRadius: BorderRadius.all(Radius.circular(100)),
- ),
- child: Container(
- alignment: Alignment.center,
- child: Text(
- content,
- style: TextStyle(color: Color(0xff666666), fontSize: 14),
- ),
- ),
- ),
- );
- }
- }
- class FeelCancelButton extends StatelessWidget {
- final VoidCallback callback;
- final String content;
- final double width;
- final double height;
- final double fontSize;
- final Color color;
- final Color borderColor;
- final Color textColor;
- static const finalColor = Color(0xffffffff);
- static const finalBorderColor = Color(0xFFFFC400);
- static const finalTextColor = Color(0xFFFFC400);
- FeelCancelButton(
- {@required this.callback,
- @required this.content,
- this.width = double.infinity,
- this.height = 44,
- this.fontSize = 28,
- this.color = finalColor,
- this.textColor = finalTextColor,
- this.borderColor = finalBorderColor});
- @override
- Widget build(BuildContext context) {
- return InkWell(
- onTap: this.callback,
- child: Container(
- width: width,
- height: height,
- decoration: BoxDecoration(
- color: color,
- borderRadius: BorderRadius.all(Radius.circular(100)),
- border: Border.all(
- color: finalBorderColor,
- width: .5,
- ),
- ),
- child: Container(
- alignment: Alignment.center,
- child: Text(
- content,
- style: TextStyle(color: textColor, fontSize: 14),
- ),
- ),
- ),
- );
- }
- }
|