From 6b7634e47fc2b99527ca3ffefee70c1e886d1971 Mon Sep 17 00:00:00 2001 From: vignesh Date: Mon, 13 Jun 2022 19:23:56 +0530 Subject: [PATCH] Add Product form design button created --- openclosenew/lib/14_businessdetailsempty.dart | 1 + openclosenew/lib/18-AddProductFrom.dart | 119 ++++++++++-------- openclosenew/lib/FontFamily.dart | 2 +- openclosenew/lib/businessdetail.dart | 29 +++-- 4 files changed, 82 insertions(+), 69 deletions(-) diff --git a/openclosenew/lib/14_businessdetailsempty.dart b/openclosenew/lib/14_businessdetailsempty.dart index c83cc44..0246532 100644 --- a/openclosenew/lib/14_businessdetailsempty.dart +++ b/openclosenew/lib/14_businessdetailsempty.dart @@ -154,6 +154,7 @@ class _businessdetailsemptyState extends State { fontWeight: FontWeight.w600, letterSpacing: 0.25, color: Gray, + fontSize: 12, ), ), ], diff --git a/openclosenew/lib/18-AddProductFrom.dart b/openclosenew/lib/18-AddProductFrom.dart index 624534a..1defc6b 100644 --- a/openclosenew/lib/18-AddProductFrom.dart +++ b/openclosenew/lib/18-AddProductFrom.dart @@ -29,83 +29,96 @@ class _addproductfromState extends State { } bool status = false; - var Color = primaryColor; + @override Widget build(BuildContext context) { loadData(); + return Scaffold( backgroundColor: White, body: SafeArea( child: Column( crossAxisAlignment: CrossAxisAlignment.start, children: [ - Padding( - padding: const EdgeInsets.only(left: 10), - child: Row( - children: [ - IconButton( - icon: Icon(Icons.arrow_back, size: 24), - onPressed: () { - Navigator.pop(context); - }, - ), - SizedBox( - width: 20, - ), - Text( - 'Add Food Item', - style: TextStyle( - fontSize: HeadText, - color: DarkGray, - fontFamily: Font, - ), - ), - ], - ), - ), Row( children: [ - Expanded( - child: Padding( - padding: const EdgeInsets.only(left: 24, bottom: 24), + IconButton( + icon: Icon(Icons.arrow_back, size: 24), + onPressed: () { + Navigator.pop(context); + }, + ), + SizedBox( + width: 20, + ), + Text( + 'Add Food Item', + style: TextStyle( + fontSize: HeadText, + color: DarkGray, + fontFamily: Font, + ), + ), + ], + ), + Padding( + padding: const EdgeInsets.only(top: 20, left: 15, right: 15), + child: Row( + children: [ + Expanded( child: MaterialButton( + color: (status == true) ? White : primaryColor, height: 50, minWidth: double.infinity, shape: RoundedRectangleBorder( - borderRadius: BorderRadius.circular(4)), - onPressed: () {}, + borderRadius: BorderRadius.only( + topLeft: Radius.circular(4), + bottomLeft: Radius.circular(4), + ), + ), + onPressed: () { + setState(() { + status = !status; + }); + }, child: Text( "Veg", style: TextStyle( - color: Gray, - 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, + color: (status == true) ? Gray : White, fontSize: HeadText, 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, + ), + ), + ), + ), + ], + ), ), ], ), diff --git a/openclosenew/lib/FontFamily.dart b/openclosenew/lib/FontFamily.dart index a2eac2b..a7fa6cc 100644 --- a/openclosenew/lib/FontFamily.dart +++ b/openclosenew/lib/FontFamily.dart @@ -1 +1 @@ -String Font = 'Manrope'; +String Font = 'Manrope.ttf'; diff --git a/openclosenew/lib/businessdetail.dart b/openclosenew/lib/businessdetail.dart index 1569ade..f74b16a 100644 --- a/openclosenew/lib/businessdetail.dart +++ b/openclosenew/lib/businessdetail.dart @@ -2,7 +2,6 @@ import 'package:flutter/material.dart'; import 'package:flutter_switch/flutter_switch.dart'; import 'package:openclosenew/14_businessdetailsempty.dart'; import 'package:smooth_page_indicator/smooth_page_indicator.dart'; - import 'FontFamily.dart'; import 'colors.dart'; import 'fontsize.dart'; @@ -414,7 +413,7 @@ class _businessdetailState extends State { fontFamily: Font, fontStyle: FontStyle.normal, fontWeight: FontWeight.w700, - fontSize: TitleText, + fontSize: HeadText, color: primaryColor, ), ), @@ -471,7 +470,7 @@ class _businessdetailState extends State { fontFamily: Font, fontStyle: FontStyle.normal, fontWeight: FontWeight.w700, - fontSize: TitleText, + fontSize: HeadText, color: primaryColor, ), ), @@ -517,7 +516,7 @@ class _businessdetailState extends State { fontFamily: Font, fontStyle: FontStyle.normal, fontWeight: FontWeight.w600, - fontSize: TitleText, + fontSize: HeadText, color: DarkGray, ), ), @@ -580,7 +579,7 @@ class _businessdetailState extends State { fontFamily: Font, fontStyle: FontStyle.normal, fontWeight: FontWeight.w600, - fontSize: HeadText, + fontSize: SubText, color: DarkGray, ), ), @@ -627,7 +626,7 @@ class _businessdetailState extends State { fontFamily: Font, fontStyle: FontStyle.normal, fontWeight: FontWeight.w600, - fontSize: HeadText, + fontSize: SubText, color: DarkGray, ), ), @@ -676,7 +675,7 @@ class _businessdetailState extends State { fontFamily: Font, fontStyle: FontStyle.normal, fontWeight: FontWeight.w600, - fontSize: HeadText, + fontSize: SubText, color: DarkGray, ), ), @@ -700,7 +699,7 @@ class _businessdetailState extends State { fontFamily: Font, fontStyle: FontStyle.normal, fontWeight: FontWeight.w600, - fontSize: TitleText, + fontSize: HeadText, color: DarkGray, ), ), @@ -801,7 +800,7 @@ class _businessdetailState extends State { fontFamily: Font, fontStyle: FontStyle.normal, fontWeight: FontWeight.w600, - fontSize: TitleText, + fontSize: HeadText, color: DarkGray, ), ), @@ -984,7 +983,7 @@ class _businessdetailState extends State { fontFamily: Font, fontStyle: FontStyle.normal, fontWeight: FontWeight.w600, - fontSize: TitleText, + fontSize: HeadText, color: DarkGray, ), ), @@ -1038,7 +1037,7 @@ class _businessdetailState extends State { fontFamily: Font, fontStyle: FontStyle.normal, fontWeight: FontWeight.w700, - fontSize: TitleText, + fontSize: HeadText, color: primaryColor, ), ), @@ -1089,7 +1088,7 @@ class _businessdetailState extends State { fontFamily: Font, fontStyle: FontStyle.normal, fontWeight: FontWeight.w700, - fontSize: TitleText, + fontSize: HeadText, color: primaryColor, ), ), @@ -1124,7 +1123,7 @@ class _businessdetailState extends State { fontFamily: Font, fontStyle: FontStyle.normal, fontWeight: FontWeight.w600, - fontSize: TitleText, + fontSize: HeadText, color: DarkGray, ), ), @@ -1180,7 +1179,7 @@ class _businessdetailState extends State { fontFamily: Font, fontStyle: FontStyle.normal, fontWeight: FontWeight.w700, - fontSize: TitleText, + fontSize: HeadText, color: primaryColor, ), ), @@ -1243,7 +1242,7 @@ class _businessdetailState extends State { fontFamily: Font, fontStyle: FontStyle.normal, fontWeight: FontWeight.w700, - fontSize: TitleText, + fontSize: HeadText, color: primaryColor, ), ),