|
| 1 | +import 'package:basic/Enums/button_size_enums.dart'; |
| 2 | +import 'package:basic/constants/color_constants.dart'; |
| 3 | +import 'package:basic/constants/textstyle_constants.dart'; |
| 4 | +import 'package:basic/screens/edit/edit_service_screen.dart'; |
| 5 | +import 'package:basic/screens/upload/upload_customer_screen.dart'; |
| 6 | +import 'package:basic/screens/upload/upload_product_screen.dart'; |
| 7 | +import 'package:basic/widgets/button_widget.dart'; |
| 8 | +import 'package:flutter/material.dart'; |
| 9 | +import 'package:flutter/services.dart'; |
| 10 | + |
| 11 | +class EditSupplierScreen extends StatelessWidget { |
| 12 | + const EditSupplierScreen({Key? key}) : super(key: key); |
| 13 | + |
| 14 | + @override |
| 15 | + Widget build(BuildContext context) { |
| 16 | + SystemChrome.setEnabledSystemUIOverlays([ |
| 17 | + SystemUiOverlay.top, |
| 18 | + SystemUiOverlay.bottom, |
| 19 | + ]); |
| 20 | + |
| 21 | + SystemChrome.setSystemUIOverlayStyle(SystemUiOverlayStyle( |
| 22 | + statusBarColor: primaryColor, |
| 23 | + statusBarBrightness: Brightness.dark, |
| 24 | + systemNavigationBarIconBrightness: Brightness.dark, |
| 25 | + statusBarIconBrightness: Brightness.light, |
| 26 | + systemNavigationBarColor: desaturatedGreyColor, |
| 27 | + )); |
| 28 | + |
| 29 | + return Scaffold( |
| 30 | + appBar: AppBar( |
| 31 | + brightness: Brightness.dark, |
| 32 | + backgroundColor: primaryColor, |
| 33 | + title: Row( |
| 34 | + mainAxisAlignment: MainAxisAlignment.spaceBetween, |
| 35 | + children: [ |
| 36 | + FittedBox( |
| 37 | + child: InkWell( |
| 38 | + onTap: () { |
| 39 | + Navigator.of(context).pop(); |
| 40 | + }, |
| 41 | + child: Container( |
| 42 | + padding: EdgeInsets.symmetric( |
| 43 | + vertical: 10, |
| 44 | + horizontal: 10, |
| 45 | + ), |
| 46 | + decoration: BoxDecoration( |
| 47 | + color: lightWhiteColor, |
| 48 | + borderRadius: BorderRadius.all(Radius.circular(10))), |
| 49 | + child: Row( |
| 50 | + children: [ |
| 51 | + Icon( |
| 52 | + Icons.arrow_back_ios, |
| 53 | + size: 17, |
| 54 | + ), |
| 55 | + SizedBox(width: 15), |
| 56 | + Text( |
| 57 | + 'Return', |
| 58 | + style: labelBoldTextStyle, |
| 59 | + ), |
| 60 | + ], |
| 61 | + ), |
| 62 | + ), |
| 63 | + ), |
| 64 | + ), |
| 65 | + FittedBox( |
| 66 | + child: InkWell( |
| 67 | + onTap: () { |
| 68 | + Navigator.of(context) |
| 69 | + .push(MaterialPageRoute(builder: (BuildContext ctx) { |
| 70 | + return UploadCustomerScreen(); |
| 71 | + })); |
| 72 | + }, |
| 73 | + child: Container( |
| 74 | + padding: EdgeInsets.symmetric( |
| 75 | + vertical: 10, |
| 76 | + horizontal: 10, |
| 77 | + ), |
| 78 | + decoration: BoxDecoration( |
| 79 | + color: lightWhiteColor, |
| 80 | + borderRadius: BorderRadius.all(Radius.circular(10))), |
| 81 | + child: Row( |
| 82 | + children: [ |
| 83 | + Image.asset('images/edit_icon.png'), |
| 84 | + SizedBox(width: 15), |
| 85 | + Text( |
| 86 | + 'Edit', |
| 87 | + style: labelBoldTextStyle, |
| 88 | + ), |
| 89 | + ], |
| 90 | + ), |
| 91 | + ), |
| 92 | + ), |
| 93 | + ), |
| 94 | + ], |
| 95 | + ), |
| 96 | + automaticallyImplyLeading: false, |
| 97 | + bottom: PreferredSize( |
| 98 | + child: Container( |
| 99 | + margin: EdgeInsets.only( |
| 100 | + left: 20, |
| 101 | + bottom: 20, |
| 102 | + ), |
| 103 | + child: Align( |
| 104 | + alignment: Alignment.topLeft, |
| 105 | + child: Text( |
| 106 | + 'John Ngu', |
| 107 | + style: h6TextStyle.merge(TextStyle(color: whiteColor)), |
| 108 | + ), |
| 109 | + ), |
| 110 | + ), |
| 111 | + preferredSize: Size.fromHeight(60), |
| 112 | + ), |
| 113 | + ), |
| 114 | + body: SingleChildScrollView( |
| 115 | + child: Container( |
| 116 | + padding: EdgeInsets.all(20), |
| 117 | + child: Column( |
| 118 | + children: [ |
| 119 | + Container( |
| 120 | + width: double.infinity, |
| 121 | + padding: EdgeInsets.symmetric( |
| 122 | + vertical: 20, |
| 123 | + horizontal: 20, |
| 124 | + ), |
| 125 | + decoration: BoxDecoration( |
| 126 | + color: whiteColor, |
| 127 | + borderRadius: BorderRadius.all(Radius.circular(20)), |
| 128 | + ), |
| 129 | + child: Text( |
| 130 | + 'Michelle Manga', |
| 131 | + style: bodyTextStyle, |
| 132 | + ), |
| 133 | + ), |
| 134 | + SizedBox(height: 10), |
| 135 | + Container( |
| 136 | + width: double.infinity, |
| 137 | + padding: EdgeInsets.symmetric( |
| 138 | + vertical: 20, |
| 139 | + horizontal: 20, |
| 140 | + ), |
| 141 | + decoration: BoxDecoration( |
| 142 | + color: whiteColor, |
| 143 | + borderRadius: BorderRadius.all(Radius.circular(20)), |
| 144 | + ), |
| 145 | + child: Text( |
| 146 | + '+237 650434343', |
| 147 | + style: bodyTextStyle, |
| 148 | + ), |
| 149 | + ), |
| 150 | + SizedBox(height: 10), |
| 151 | + Container( |
| 152 | + width: double.infinity, |
| 153 | + padding: EdgeInsets.symmetric( |
| 154 | + vertical: 20, |
| 155 | + horizontal: 20, |
| 156 | + ), |
| 157 | + decoration: BoxDecoration( |
| 158 | + color: whiteColor, |
| 159 | + borderRadius: BorderRadius.all(Radius.circular(20)), |
| 160 | + ), |
| 161 | + child: Text( |
| 162 | + 'Cameroon', |
| 163 | + style: bodyTextStyle, |
| 164 | + ), |
| 165 | + ), |
| 166 | + SizedBox(height: 10), |
| 167 | + Container( |
| 168 | + width: double.infinity, |
| 169 | + padding: EdgeInsets.symmetric( |
| 170 | + vertical: 20, |
| 171 | + horizontal: 20, |
| 172 | + ), |
| 173 | + decoration: BoxDecoration( |
| 174 | + color: whiteColor, |
| 175 | + borderRadius: BorderRadius.all(Radius.circular(20)), |
| 176 | + ), |
| 177 | + child: Text( |
| 178 | + 'Littoral', |
| 179 | + style: bodyTextStyle, |
| 180 | + ), |
| 181 | + ), |
| 182 | + SizedBox(height: 10), |
| 183 | + Container( |
| 184 | + width: double.infinity, |
| 185 | + padding: EdgeInsets.symmetric( |
| 186 | + vertical: 20, |
| 187 | + horizontal: 20, |
| 188 | + ), |
| 189 | + decoration: BoxDecoration( |
| 190 | + color: whiteColor, |
| 191 | + borderRadius: BorderRadius.all(Radius.circular(20)), |
| 192 | + ), |
| 193 | + child: Text( |
| 194 | + 'Douala', |
| 195 | + style: bodyTextStyle, |
| 196 | + ), |
| 197 | + ), |
| 198 | + SizedBox(height: 10), |
| 199 | + Container( |
| 200 | + width: double.infinity, |
| 201 | + padding: EdgeInsets.symmetric( |
| 202 | + vertical: 20, |
| 203 | + horizontal: 20, |
| 204 | + ), |
| 205 | + decoration: BoxDecoration( |
| 206 | + color: whiteColor, |
| 207 | + borderRadius: BorderRadius.all(Radius.circular(20)), |
| 208 | + ), |
| 209 | + child: Text( |
| 210 | + 'Bali', |
| 211 | + style: bodyTextStyle, |
| 212 | + ), |
| 213 | + ), |
| 214 | + SizedBox(height: 20), |
| 215 | + ], |
| 216 | + ), |
| 217 | + ), |
| 218 | + ), |
| 219 | + persistentFooterButtons: [ |
| 220 | + Container( |
| 221 | + padding: EdgeInsets.all(10), |
| 222 | + color: desaturatedGreyColor, |
| 223 | + child: ButtonWidget( |
| 224 | + backgroundColor: lightRedColor!, |
| 225 | + loading: false, |
| 226 | + onTap: () {}, |
| 227 | + size: ButtonSize.big, |
| 228 | + text: 'Delete supplier', |
| 229 | + textColor: redColor!, |
| 230 | + )), |
| 231 | + ], |
| 232 | + ); |
| 233 | + } |
| 234 | +} |
0 commit comments