Add Product form design button created

This commit is contained in:
vignesh 2022-06-13 19:23:56 +05:30
parent 92a6f9ab2c
commit 6b7634e47f
4 changed files with 82 additions and 69 deletions

View File

@ -154,6 +154,7 @@ class _businessdetailsemptyState extends State<businessdetailsempty> {
fontWeight: FontWeight.w600, fontWeight: FontWeight.w600,
letterSpacing: 0.25, letterSpacing: 0.25,
color: Gray, color: Gray,
fontSize: 12,
), ),
), ),
], ],

View File

@ -29,19 +29,18 @@ class _addproductfromState extends State<addproductfrom> {
} }
bool status = false; bool status = false;
var Color = primaryColor;
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
loadData(); loadData();
return Scaffold( return Scaffold(
backgroundColor: White, backgroundColor: White,
body: SafeArea( body: SafeArea(
child: Column( child: Column(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
Padding( Row(
padding: const EdgeInsets.only(left: 10),
child: Row(
children: [ children: [
IconButton( IconButton(
icon: Icon(Icons.arrow_back, size: 24), icon: Icon(Icons.arrow_back, size: 24),
@ -62,51 +61,65 @@ class _addproductfromState extends State<addproductfrom> {
), ),
], ],
), ),
), Padding(
Row( padding: const EdgeInsets.only(top: 20, left: 15, right: 15),
child: Row(
children: [ children: [
Expanded( Expanded(
child: Padding(
padding: const EdgeInsets.only(left: 24, bottom: 24),
child: MaterialButton( child: MaterialButton(
color: (status == true) ? White : primaryColor,
height: 50, height: 50,
minWidth: double.infinity, minWidth: double.infinity,
shape: RoundedRectangleBorder( shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(4)), borderRadius: BorderRadius.only(
onPressed: () {}, topLeft: Radius.circular(4),
bottomLeft: Radius.circular(4),
),
),
onPressed: () {
setState(() {
status = !status;
});
},
child: Text( child: Text(
"Veg", "Veg",
style: TextStyle( style: TextStyle(
color: Gray, color: (status == true) ? Gray : White,
fontFamily: Font,
),
),
),
),
),
Expanded(
child: Padding(
padding: const EdgeInsets.only(right: 24, bottom: 24),
child: MaterialButton(
height: 50,
minWidth: double.infinity,
color: primaryColor,
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(4)),
onPressed: () {},
child: Text(
'Non Veg',
style: TextStyle(
color: White,
fontSize: HeadText, fontSize: HeadText,
fontFamily: Font, fontFamily: Font,
), ),
), ),
), ),
), ),
Expanded(
child: MaterialButton(
color: (status == true) ? primaryColor : White,
height: 50,
minWidth: double.infinity,
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.only(
topRight: Radius.circular(4),
bottomRight: Radius.circular(4),
),
),
onPressed: () {
setState(() {
status = !status;
});
},
child: Text(
"Non Veg",
style: TextStyle(
color: (status == true) ? White : Gray,
fontSize: HeadText,
fontFamily: Font,
),
),
),
), ),
], ],
), ),
),
], ],
), ),
), ),

View File

@ -1 +1 @@
String Font = 'Manrope'; String Font = 'Manrope.ttf';

View File

@ -2,7 +2,6 @@ import 'package:flutter/material.dart';
import 'package:flutter_switch/flutter_switch.dart'; import 'package:flutter_switch/flutter_switch.dart';
import 'package:openclosenew/14_businessdetailsempty.dart'; import 'package:openclosenew/14_businessdetailsempty.dart';
import 'package:smooth_page_indicator/smooth_page_indicator.dart'; import 'package:smooth_page_indicator/smooth_page_indicator.dart';
import 'FontFamily.dart'; import 'FontFamily.dart';
import 'colors.dart'; import 'colors.dart';
import 'fontsize.dart'; import 'fontsize.dart';
@ -414,7 +413,7 @@ class _businessdetailState extends State<businessdetail> {
fontFamily: Font, fontFamily: Font,
fontStyle: FontStyle.normal, fontStyle: FontStyle.normal,
fontWeight: FontWeight.w700, fontWeight: FontWeight.w700,
fontSize: TitleText, fontSize: HeadText,
color: primaryColor, color: primaryColor,
), ),
), ),
@ -471,7 +470,7 @@ class _businessdetailState extends State<businessdetail> {
fontFamily: Font, fontFamily: Font,
fontStyle: FontStyle.normal, fontStyle: FontStyle.normal,
fontWeight: FontWeight.w700, fontWeight: FontWeight.w700,
fontSize: TitleText, fontSize: HeadText,
color: primaryColor, color: primaryColor,
), ),
), ),
@ -517,7 +516,7 @@ class _businessdetailState extends State<businessdetail> {
fontFamily: Font, fontFamily: Font,
fontStyle: FontStyle.normal, fontStyle: FontStyle.normal,
fontWeight: FontWeight.w600, fontWeight: FontWeight.w600,
fontSize: TitleText, fontSize: HeadText,
color: DarkGray, color: DarkGray,
), ),
), ),
@ -580,7 +579,7 @@ class _businessdetailState extends State<businessdetail> {
fontFamily: Font, fontFamily: Font,
fontStyle: FontStyle.normal, fontStyle: FontStyle.normal,
fontWeight: FontWeight.w600, fontWeight: FontWeight.w600,
fontSize: HeadText, fontSize: SubText,
color: DarkGray, color: DarkGray,
), ),
), ),
@ -627,7 +626,7 @@ class _businessdetailState extends State<businessdetail> {
fontFamily: Font, fontFamily: Font,
fontStyle: FontStyle.normal, fontStyle: FontStyle.normal,
fontWeight: FontWeight.w600, fontWeight: FontWeight.w600,
fontSize: HeadText, fontSize: SubText,
color: DarkGray, color: DarkGray,
), ),
), ),
@ -676,7 +675,7 @@ class _businessdetailState extends State<businessdetail> {
fontFamily: Font, fontFamily: Font,
fontStyle: FontStyle.normal, fontStyle: FontStyle.normal,
fontWeight: FontWeight.w600, fontWeight: FontWeight.w600,
fontSize: HeadText, fontSize: SubText,
color: DarkGray, color: DarkGray,
), ),
), ),
@ -700,7 +699,7 @@ class _businessdetailState extends State<businessdetail> {
fontFamily: Font, fontFamily: Font,
fontStyle: FontStyle.normal, fontStyle: FontStyle.normal,
fontWeight: FontWeight.w600, fontWeight: FontWeight.w600,
fontSize: TitleText, fontSize: HeadText,
color: DarkGray, color: DarkGray,
), ),
), ),
@ -801,7 +800,7 @@ class _businessdetailState extends State<businessdetail> {
fontFamily: Font, fontFamily: Font,
fontStyle: FontStyle.normal, fontStyle: FontStyle.normal,
fontWeight: FontWeight.w600, fontWeight: FontWeight.w600,
fontSize: TitleText, fontSize: HeadText,
color: DarkGray, color: DarkGray,
), ),
), ),
@ -984,7 +983,7 @@ class _businessdetailState extends State<businessdetail> {
fontFamily: Font, fontFamily: Font,
fontStyle: FontStyle.normal, fontStyle: FontStyle.normal,
fontWeight: FontWeight.w600, fontWeight: FontWeight.w600,
fontSize: TitleText, fontSize: HeadText,
color: DarkGray, color: DarkGray,
), ),
), ),
@ -1038,7 +1037,7 @@ class _businessdetailState extends State<businessdetail> {
fontFamily: Font, fontFamily: Font,
fontStyle: FontStyle.normal, fontStyle: FontStyle.normal,
fontWeight: FontWeight.w700, fontWeight: FontWeight.w700,
fontSize: TitleText, fontSize: HeadText,
color: primaryColor, color: primaryColor,
), ),
), ),
@ -1089,7 +1088,7 @@ class _businessdetailState extends State<businessdetail> {
fontFamily: Font, fontFamily: Font,
fontStyle: FontStyle.normal, fontStyle: FontStyle.normal,
fontWeight: FontWeight.w700, fontWeight: FontWeight.w700,
fontSize: TitleText, fontSize: HeadText,
color: primaryColor, color: primaryColor,
), ),
), ),
@ -1124,7 +1123,7 @@ class _businessdetailState extends State<businessdetail> {
fontFamily: Font, fontFamily: Font,
fontStyle: FontStyle.normal, fontStyle: FontStyle.normal,
fontWeight: FontWeight.w600, fontWeight: FontWeight.w600,
fontSize: TitleText, fontSize: HeadText,
color: DarkGray, color: DarkGray,
), ),
), ),
@ -1180,7 +1179,7 @@ class _businessdetailState extends State<businessdetail> {
fontFamily: Font, fontFamily: Font,
fontStyle: FontStyle.normal, fontStyle: FontStyle.normal,
fontWeight: FontWeight.w700, fontWeight: FontWeight.w700,
fontSize: TitleText, fontSize: HeadText,
color: primaryColor, color: primaryColor,
), ),
), ),
@ -1243,7 +1242,7 @@ class _businessdetailState extends State<businessdetail> {
fontFamily: Font, fontFamily: Font,
fontStyle: FontStyle.normal, fontStyle: FontStyle.normal,
fontWeight: FontWeight.w700, fontWeight: FontWeight.w700,
fontSize: TitleText, fontSize: HeadText,
color: primaryColor, color: primaryColor,
), ),
), ),