39 lines
1020 B
Dart
39 lines
1020 B
Dart
|
|
import 'package:flutter/material.dart';
|
|
import 'package:novyronst/common/const/const_string.dart';
|
|
import 'package:novyronst/common/help/help_image.dart';
|
|
import 'package:novyronst/tools/widgets/extend_widget.dart';
|
|
import 'package:novyronst/tools/widgets/novy_com_widget.dart';
|
|
|
|
class NovyButtonBg extends StatelessWidget {
|
|
const NovyButtonBg({super.key,
|
|
this.width,
|
|
required this.text,
|
|
this.onTap,
|
|
this.type = 1,
|
|
});
|
|
|
|
final double? width;
|
|
final String text;
|
|
final VoidCallback? onTap;
|
|
final int type;
|
|
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
return Stack(
|
|
children: [
|
|
HelpImage.asset(type==1 ? ConstImage.btnBgRad1 : ConstImage.btnBgRad2,
|
|
width: width, height: 33,
|
|
fit: BoxFit.fill,
|
|
),
|
|
Positioned.fill(child: Center(
|
|
child: NovyText(text,
|
|
fontSize: 14,
|
|
color: Colors.black,
|
|
fontFamily: ConstFont.montBold
|
|
),
|
|
)),
|
|
],
|
|
).addInkWell(onTap: onTap);
|
|
}
|
|
} |