first commit
This commit is contained in:
189
lib/main.dart
Normal file
189
lib/main.dart
Normal file
@@ -0,0 +1,189 @@
|
||||
import 'package:Mobile_POS/screens/add_to_cart_screen.dart';
|
||||
import 'package:Mobile_POS/screens/dashboard_screen.dart';
|
||||
import './screens/login_screen.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
void main() {
|
||||
runApp(MyApp());
|
||||
}
|
||||
|
||||
class MyApp extends StatelessWidget {
|
||||
// This widget is the root of your application.
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return MaterialApp(
|
||||
title: 'Flutter Demo',
|
||||
theme: ThemeData(
|
||||
primarySwatch: Colors.deepOrange,
|
||||
scaffoldBackgroundColor: Colors.white,
|
||||
),
|
||||
debugShowCheckedModeBanner: false,
|
||||
// home: MyHomePage(),
|
||||
home: LoginScreen(),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
class MyHomePage extends StatefulWidget {
|
||||
@override
|
||||
_MyHomePageState createState() => _MyHomePageState();
|
||||
}
|
||||
|
||||
class _MyHomePageState extends State<MyHomePage> with SingleTickerProviderStateMixin {
|
||||
int _currentIndex = 0;
|
||||
|
||||
TabController controller;
|
||||
|
||||
@override
|
||||
void initState(){
|
||||
super.initState();
|
||||
controller = TabController(length: 2, vsync: this);
|
||||
}
|
||||
|
||||
@override
|
||||
void dispose(){
|
||||
controller.dispose();
|
||||
super.dispose();
|
||||
}
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Scaffold(
|
||||
appBar: AppBar(
|
||||
title: Text(
|
||||
'Simon\'s BBQ Team',
|
||||
),
|
||||
bottom: TabBar(
|
||||
controller: controller,
|
||||
tabs: [
|
||||
Tab(
|
||||
icon: Icon(Icons.all_inbox),
|
||||
child: Text('Item'),
|
||||
),
|
||||
Tab(
|
||||
icon: Icon(Icons.add_shopping_cart),
|
||||
child: Text('Add to Cart'),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
endDrawer: Drawer(
|
||||
child: Column(
|
||||
children: [
|
||||
Container(
|
||||
width: double.infinity,
|
||||
padding: EdgeInsets.symmetric(vertical: 20),
|
||||
color: Colors.deepOrange,
|
||||
child: Column(
|
||||
children: [
|
||||
Icon(
|
||||
Icons.food_bank_outlined,
|
||||
size: 200,
|
||||
color: Colors.white,
|
||||
),
|
||||
Text(
|
||||
'Simon\'s BBQ Team',
|
||||
style: TextStyle(
|
||||
fontSize: 20,
|
||||
fontWeight: FontWeight.w500,
|
||||
color: Colors.white,
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
ListTile(
|
||||
onTap: (){},
|
||||
leading: Icon(Icons.person_rounded),
|
||||
title: Text(
|
||||
'Profile',
|
||||
style: TextStyle(
|
||||
fontSize: 18,
|
||||
),
|
||||
),
|
||||
),
|
||||
ListTile(
|
||||
onTap: (){},
|
||||
leading: Icon(Icons.account_box_outlined),
|
||||
title: Text(
|
||||
'About Us',
|
||||
style: TextStyle(
|
||||
fontSize: 18,
|
||||
),
|
||||
),
|
||||
),
|
||||
ListTile(
|
||||
onTap: (){},
|
||||
leading: Icon(Icons.contact_page),
|
||||
title: Text(
|
||||
'Contact Us',
|
||||
style: TextStyle(
|
||||
fontSize: 18,
|
||||
),
|
||||
),
|
||||
),
|
||||
ListTile(
|
||||
onTap: (){},
|
||||
leading: Icon(Icons.help_outline_rounded),
|
||||
title: Text(
|
||||
'Help',
|
||||
style: TextStyle(
|
||||
fontSize: 18,
|
||||
),
|
||||
),
|
||||
),
|
||||
ListTile(
|
||||
onTap: (){},
|
||||
leading: Icon(Icons.exit_to_app),
|
||||
title: Text(
|
||||
'Exit',
|
||||
style: TextStyle(
|
||||
fontSize: 18,
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
body: TabBarView(
|
||||
controller: controller,
|
||||
children: [
|
||||
DashboardScreen(),
|
||||
AddToCartScreen(),
|
||||
],
|
||||
),
|
||||
bottomNavigationBar: BottomNavigationBar(
|
||||
currentIndex: _currentIndex,
|
||||
type: BottomNavigationBarType.fixed,
|
||||
backgroundColor: Colors.blueGrey[100],
|
||||
items: [
|
||||
BottomNavigationBarItem(
|
||||
icon: Icon(Icons.all_inbox_outlined),
|
||||
title: Text('All Items'),
|
||||
),
|
||||
BottomNavigationBarItem(
|
||||
icon: Icon(Icons.food_bank_outlined),
|
||||
title: Text('Food'),
|
||||
),
|
||||
BottomNavigationBarItem(
|
||||
icon: Icon(Icons.hourglass_bottom),
|
||||
title: Text('Alcohol'),
|
||||
),
|
||||
BottomNavigationBarItem(
|
||||
icon: Icon(Icons.local_drink),
|
||||
title: Text('Cold Drinks'),
|
||||
),
|
||||
BottomNavigationBarItem(
|
||||
icon: Icon(Icons.no_drinks),
|
||||
title: Text('Hot Drinks'),
|
||||
),
|
||||
],
|
||||
onTap: (index){
|
||||
setState(() {
|
||||
_currentIndex = index;
|
||||
});
|
||||
},
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
545
lib/screens/add_to_cart_screen.dart
Normal file
545
lib/screens/add_to_cart_screen.dart
Normal file
@@ -0,0 +1,545 @@
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
class AddToCartScreen extends StatefulWidget {
|
||||
@override
|
||||
_AddToCartScreenState createState() => _AddToCartScreenState();
|
||||
}
|
||||
|
||||
class _AddToCartScreenState extends State<AddToCartScreen> {
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Container(
|
||||
child: SingleChildScrollView(
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.symmetric(horizontal: 10.0, vertical: 5.0),
|
||||
child: Column(
|
||||
children: [
|
||||
// Options Row
|
||||
Row(
|
||||
mainAxisAlignment: MainAxisAlignment.end,
|
||||
children: [
|
||||
RaisedButton(
|
||||
onPressed: (){},
|
||||
child: Text('Clear All'),
|
||||
color: Colors.redAccent[100],
|
||||
textColor: Colors.redAccent[700],
|
||||
),
|
||||
Container(
|
||||
width: 10,
|
||||
height: 10,
|
||||
),
|
||||
IconButton(
|
||||
onPressed: (){},
|
||||
icon: Icon(Icons.settings),
|
||||
iconSize: 40,
|
||||
),
|
||||
],
|
||||
),
|
||||
SizedBox(height: 10,),
|
||||
// Add to cart Row
|
||||
Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
Container(
|
||||
width: 50,
|
||||
height: 50,
|
||||
decoration: BoxDecoration(
|
||||
borderRadius: BorderRadius.circular(5),
|
||||
image: DecorationImage(
|
||||
fit: BoxFit.cover,
|
||||
image: NetworkImage('https://images.pexels.com/photos/286283/pexels-photo-286283.jpeg?auto=compress&cs=tinysrgb&h=750&w=1260')
|
||||
)
|
||||
),
|
||||
),
|
||||
Container(
|
||||
width: 110,
|
||||
child: Text(
|
||||
'Grilled Corn',
|
||||
style: TextStyle(
|
||||
fontSize: 18,
|
||||
fontWeight: FontWeight.w500
|
||||
),
|
||||
),
|
||||
),
|
||||
FloatingActionButton(
|
||||
onPressed: (){},
|
||||
child: Icon(Icons.remove),
|
||||
backgroundColor: Colors.blueGrey[300],
|
||||
),
|
||||
Text(
|
||||
"1",
|
||||
style: TextStyle(
|
||||
fontSize: 28,
|
||||
fontWeight: FontWeight.w500
|
||||
),
|
||||
),
|
||||
FloatingActionButton(
|
||||
onPressed: (){},
|
||||
child: Icon(Icons.add),
|
||||
backgroundColor: Colors.blueGrey[300],
|
||||
),
|
||||
Text(
|
||||
'\$1.75',
|
||||
style: TextStyle(
|
||||
fontSize: 22,
|
||||
fontWeight: FontWeight.w500,
|
||||
color: Colors.deepOrange
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
SizedBox(height: 10,),
|
||||
Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
Container(
|
||||
width: 50,
|
||||
height: 50,
|
||||
decoration: BoxDecoration(
|
||||
borderRadius: BorderRadius.circular(5),
|
||||
image: DecorationImage(
|
||||
fit: BoxFit.cover,
|
||||
image: NetworkImage('https://images.pexels.com/photos/1435735/pexels-photo-1435735.jpeg?auto=compress&cs=tinysrgb&dpr=2&h=750&w=1260')
|
||||
)
|
||||
),
|
||||
),
|
||||
Container(
|
||||
width: 110,
|
||||
child: Text(
|
||||
'Fruit',
|
||||
style: TextStyle(
|
||||
fontSize: 18,
|
||||
fontWeight: FontWeight.w500
|
||||
),
|
||||
),
|
||||
),
|
||||
FloatingActionButton(
|
||||
onPressed: (){},
|
||||
child: Icon(Icons.remove),
|
||||
backgroundColor: Colors.blueGrey[300],
|
||||
),
|
||||
Text(
|
||||
"3",
|
||||
style: TextStyle(
|
||||
fontSize: 28,
|
||||
fontWeight: FontWeight.w500
|
||||
),
|
||||
),
|
||||
FloatingActionButton(
|
||||
onPressed: (){},
|
||||
child: Icon(Icons.add),
|
||||
backgroundColor: Colors.blueGrey[300],
|
||||
),
|
||||
Text(
|
||||
'\$4.95',
|
||||
style: TextStyle(
|
||||
fontSize: 22,
|
||||
fontWeight: FontWeight.w500,
|
||||
color: Colors.deepOrange
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
SizedBox(height: 10,),
|
||||
Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
Container(
|
||||
width: 50,
|
||||
height: 50,
|
||||
decoration: BoxDecoration(
|
||||
borderRadius: BorderRadius.circular(5),
|
||||
image: DecorationImage(
|
||||
fit: BoxFit.cover,
|
||||
image: NetworkImage('https://images.pexels.com/photos/3206433/pexels-photo-3206433.jpeg?auto=compress&cs=tinysrgb&dpr=2&h=750&w=1260')
|
||||
)
|
||||
),
|
||||
),
|
||||
Container(
|
||||
width: 110,
|
||||
child: Text(
|
||||
'Cho Cafe',
|
||||
style: TextStyle(
|
||||
fontSize: 18,
|
||||
fontWeight: FontWeight.w500
|
||||
),
|
||||
),
|
||||
),
|
||||
FloatingActionButton(
|
||||
onPressed: (){},
|
||||
child: Icon(Icons.remove),
|
||||
backgroundColor: Colors.blueGrey[300],
|
||||
),
|
||||
Text(
|
||||
"1",
|
||||
style: TextStyle(
|
||||
fontSize: 28,
|
||||
fontWeight: FontWeight.w500
|
||||
),
|
||||
),
|
||||
FloatingActionButton(
|
||||
onPressed: (){},
|
||||
child: Icon(Icons.add),
|
||||
backgroundColor: Colors.blueGrey[300],
|
||||
),
|
||||
Text(
|
||||
'\$0.75',
|
||||
style: TextStyle(
|
||||
fontSize: 22,
|
||||
fontWeight: FontWeight.w500,
|
||||
color: Colors.deepOrange
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
SizedBox(height: 10,),
|
||||
Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
Container(
|
||||
width: 50,
|
||||
height: 50,
|
||||
decoration: BoxDecoration(
|
||||
borderRadius: BorderRadius.circular(5),
|
||||
image: DecorationImage(
|
||||
fit: BoxFit.cover,
|
||||
image: NetworkImage('https://images.pexels.com/photos/3662104/pexels-photo-3662104.jpeg?auto=compress&cs=tinysrgb&dpr=2&h=750&w=1260')
|
||||
)
|
||||
),
|
||||
),
|
||||
Container(
|
||||
width: 110,
|
||||
child: Text(
|
||||
'Che Soup',
|
||||
style: TextStyle(
|
||||
fontSize: 18,
|
||||
fontWeight: FontWeight.w500
|
||||
),
|
||||
),
|
||||
),
|
||||
FloatingActionButton(
|
||||
onPressed: (){},
|
||||
child: Icon(Icons.remove),
|
||||
backgroundColor: Colors.blueGrey[300],
|
||||
),
|
||||
Text(
|
||||
"2",
|
||||
style: TextStyle(
|
||||
fontSize: 28,
|
||||
fontWeight: FontWeight.w500
|
||||
),
|
||||
),
|
||||
FloatingActionButton(
|
||||
onPressed: (){},
|
||||
child: Icon(Icons.add),
|
||||
backgroundColor: Colors.blueGrey[300],
|
||||
),
|
||||
Text(
|
||||
'\$5.50',
|
||||
style: TextStyle(
|
||||
fontSize: 22,
|
||||
fontWeight: FontWeight.w500,
|
||||
color: Colors.deepOrange
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
SizedBox(height: 10,),
|
||||
Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
Container(
|
||||
width: 50,
|
||||
height: 50,
|
||||
decoration: BoxDecoration(
|
||||
borderRadius: BorderRadius.circular(5),
|
||||
image: DecorationImage(
|
||||
fit: BoxFit.cover,
|
||||
image: NetworkImage('https://images.pexels.com/photos/1435706/pexels-photo-1435706.jpeg?auto=compress&cs=tinysrgb&dpr=2&h=750&w=1260')
|
||||
)
|
||||
),
|
||||
),
|
||||
Container(
|
||||
width: 110,
|
||||
child: Text(
|
||||
'Nat Milk',
|
||||
style: TextStyle(
|
||||
fontSize: 18,
|
||||
fontWeight: FontWeight.w500
|
||||
),
|
||||
),
|
||||
),
|
||||
FloatingActionButton(
|
||||
onPressed: (){},
|
||||
child: Icon(Icons.remove),
|
||||
backgroundColor: Colors.blueGrey[300],
|
||||
),
|
||||
Text(
|
||||
"5",
|
||||
style: TextStyle(
|
||||
fontSize: 28,
|
||||
fontWeight: FontWeight.w500
|
||||
),
|
||||
),
|
||||
FloatingActionButton(
|
||||
onPressed: (){},
|
||||
child: Icon(Icons.add),
|
||||
backgroundColor: Colors.blueGrey[300],
|
||||
),
|
||||
Text(
|
||||
'\$9.25',
|
||||
style: TextStyle(
|
||||
fontSize: 22,
|
||||
fontWeight: FontWeight.w500,
|
||||
color: Colors.deepOrange
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
SizedBox(height: 10,),
|
||||
Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
Container(
|
||||
width: 50,
|
||||
height: 50,
|
||||
decoration: BoxDecoration(
|
||||
borderRadius: BorderRadius.circular(5),
|
||||
image: DecorationImage(
|
||||
fit: BoxFit.cover,
|
||||
image: NetworkImage('https://images.pexels.com/photos/1998635/pexels-photo-1998635.jpeg?auto=compress&cs=tinysrgb&dpr=2&h=750&w=1260')
|
||||
)
|
||||
),
|
||||
),
|
||||
Container(
|
||||
width: 110,
|
||||
child: Text(
|
||||
'Cho Cake',
|
||||
style: TextStyle(
|
||||
fontSize: 18,
|
||||
fontWeight: FontWeight.w500
|
||||
),
|
||||
),
|
||||
),
|
||||
FloatingActionButton(
|
||||
onPressed: (){},
|
||||
child: Icon(Icons.remove),
|
||||
backgroundColor: Colors.blueGrey[300],
|
||||
),
|
||||
Text(
|
||||
"1",
|
||||
style: TextStyle(
|
||||
fontSize: 28,
|
||||
fontWeight: FontWeight.w500
|
||||
),
|
||||
),
|
||||
FloatingActionButton(
|
||||
onPressed: (){},
|
||||
child: Icon(Icons.add),
|
||||
backgroundColor: Colors.blueGrey[300],
|
||||
),
|
||||
Text(
|
||||
'\$1.95',
|
||||
style: TextStyle(
|
||||
fontSize: 22,
|
||||
fontWeight: FontWeight.w500,
|
||||
color: Colors.deepOrange
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
SizedBox(height: 30,),
|
||||
// Detail Price Row
|
||||
Column(
|
||||
children: [
|
||||
Container(
|
||||
child: Card(
|
||||
elevation: 5,
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.all(15.0),
|
||||
child: Column(
|
||||
children: [
|
||||
Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
Text(
|
||||
'Subtotal',
|
||||
style: TextStyle(
|
||||
fontSize: 18,
|
||||
),
|
||||
),
|
||||
Text(
|
||||
'\$24.15',
|
||||
style: TextStyle(
|
||||
fontSize: 18,
|
||||
fontWeight: FontWeight.bold
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
SizedBox(height: 10,),
|
||||
Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
Text(
|
||||
'Discount',
|
||||
style: TextStyle(
|
||||
fontSize: 18,
|
||||
),
|
||||
),
|
||||
Text(
|
||||
'- \$5.00',
|
||||
style: TextStyle(
|
||||
fontSize: 18,
|
||||
fontWeight: FontWeight.bold
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
SizedBox(height: 10,),
|
||||
Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
Text(
|
||||
'Sales Tax',
|
||||
style: TextStyle(
|
||||
fontSize: 18,
|
||||
),
|
||||
),
|
||||
Text(
|
||||
'\$2.25',
|
||||
style: TextStyle(
|
||||
fontSize: 18,
|
||||
fontWeight: FontWeight.bold
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
SizedBox(height: 15,),
|
||||
Container(
|
||||
width: double.infinity,
|
||||
height: 1,
|
||||
color: Colors.blueGrey,
|
||||
),
|
||||
SizedBox(height: 15,),
|
||||
Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
Text(
|
||||
'Total',
|
||||
style: TextStyle(
|
||||
fontSize: 24,
|
||||
),
|
||||
),
|
||||
Text(
|
||||
'\$26.40',
|
||||
style: TextStyle(
|
||||
fontSize: 30,
|
||||
fontWeight: FontWeight.bold
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
SizedBox(height: 20,),
|
||||
// Cashless Credit Row
|
||||
Container(
|
||||
child: Card(
|
||||
elevation: 5,
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.all(10.0),
|
||||
child: Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Text(
|
||||
'CASHLESS CREDIT',
|
||||
style: TextStyle(
|
||||
fontWeight: FontWeight.bold,
|
||||
fontSize: 13,
|
||||
color: Colors.indigo[700],
|
||||
),
|
||||
),
|
||||
Text(
|
||||
'\$21.40',
|
||||
style: TextStyle(
|
||||
fontSize: 26,
|
||||
color: Colors.deepOrange,
|
||||
fontWeight: FontWeight.bold,
|
||||
),
|
||||
),
|
||||
Text(
|
||||
'Available',
|
||||
style: TextStyle(
|
||||
fontSize: 12,
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
RaisedButton(
|
||||
onPressed: (){},
|
||||
child: Text(
|
||||
'Cancel'
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
SizedBox(height: 20,),
|
||||
// Button Pay Cashless
|
||||
Container(
|
||||
width: double.infinity,
|
||||
child: RaisedButton(
|
||||
onPressed: (){},
|
||||
child: Text(
|
||||
'Pay With Cashless Credit',
|
||||
style: TextStyle(
|
||||
fontSize: 12,
|
||||
color: Colors.white,
|
||||
),
|
||||
),
|
||||
color: Colors.deepOrange,
|
||||
padding: EdgeInsets.symmetric(vertical: 15),
|
||||
),
|
||||
),
|
||||
SizedBox(height: 10,),
|
||||
// Balance Due Row
|
||||
Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
Text(
|
||||
'Balance Due',
|
||||
style: TextStyle(
|
||||
fontSize: 13,
|
||||
color: Colors.black,
|
||||
),
|
||||
),
|
||||
Text(
|
||||
'\$5.00',
|
||||
style: TextStyle(
|
||||
fontSize: 15,
|
||||
fontWeight: FontWeight.bold,
|
||||
color: Colors.black,
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
468
lib/screens/dashboard_screen.dart
Normal file
468
lib/screens/dashboard_screen.dart
Normal file
@@ -0,0 +1,468 @@
|
||||
import 'add_to_cart_screen.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
class DashboardScreen extends StatefulWidget {
|
||||
@override
|
||||
_DashboardScreenState createState() => _DashboardScreenState();
|
||||
}
|
||||
|
||||
class _DashboardScreenState extends State<DashboardScreen> {
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Container(
|
||||
child: SingleChildScrollView(
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.symmetric(horizontal: 10.0, vertical: 5.0),
|
||||
child: Column(
|
||||
children: [
|
||||
Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
Text(
|
||||
'Location ID#SMON123',
|
||||
style: TextStyle(
|
||||
fontSize: 12
|
||||
),
|
||||
),
|
||||
Container(
|
||||
width: 90,
|
||||
child: Column(
|
||||
mainAxisAlignment: MainAxisAlignment.end,
|
||||
children: [
|
||||
Text(
|
||||
'Last Synced',
|
||||
style: TextStyle(
|
||||
fontSize: 12,
|
||||
color: Colors.blueGrey,
|
||||
),
|
||||
),
|
||||
Container(
|
||||
child: Row(
|
||||
children: [
|
||||
Container(
|
||||
width: 10,
|
||||
height: 10,
|
||||
margin: EdgeInsets.only(right: 6.0),
|
||||
decoration: BoxDecoration(
|
||||
borderRadius: BorderRadius.circular(10),
|
||||
color: Colors.green[400],
|
||||
),
|
||||
),
|
||||
Text(
|
||||
'3 mins ago',
|
||||
style: TextStyle(
|
||||
fontSize: 13
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
RaisedButton(
|
||||
padding: EdgeInsets.symmetric(vertical: 10, horizontal: 15),
|
||||
onPressed: () {},
|
||||
child: Row(
|
||||
children: [
|
||||
Icon(
|
||||
Icons.help_outline_rounded,
|
||||
size: 20,
|
||||
),
|
||||
Text(
|
||||
'Help',
|
||||
style: TextStyle(
|
||||
fontSize: 16
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
SizedBox(height: 10,),
|
||||
Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
Container(
|
||||
width: 190,
|
||||
height: 140,
|
||||
child: Card(
|
||||
elevation: 5,
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.all(10.0),
|
||||
child: Row(
|
||||
children: [
|
||||
Container(
|
||||
width: 110,
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Text(
|
||||
'Grilled Corn',
|
||||
style: TextStyle(
|
||||
fontSize: 20,
|
||||
fontWeight: FontWeight.bold,
|
||||
),
|
||||
),
|
||||
SizedBox(height: 10,),
|
||||
Text(
|
||||
'150g',
|
||||
style: TextStyle(
|
||||
fontSize: 18,
|
||||
color: Colors.blueGrey[300],
|
||||
),
|
||||
),
|
||||
SizedBox(height: 30,),
|
||||
Text(
|
||||
'\$1.75',
|
||||
style: TextStyle(
|
||||
fontSize: 22,
|
||||
fontWeight: FontWeight.bold,
|
||||
color: Colors.deepOrange,
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
Container(
|
||||
width: 50,
|
||||
height: 80,
|
||||
margin: EdgeInsets.only(top: 20),
|
||||
child: Container(
|
||||
decoration: BoxDecoration(
|
||||
borderRadius: BorderRadius.circular(10),
|
||||
image: DecorationImage(
|
||||
fit: BoxFit.cover,
|
||||
image: NetworkImage('https://images.pexels.com/photos/286283/pexels-photo-286283.jpeg?auto=compress&cs=tinysrgb&h=750&w=1260'),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
Container(
|
||||
width: 190,
|
||||
height: 140,
|
||||
child: Card(
|
||||
elevation: 5,
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.all(10.0),
|
||||
child: Row(
|
||||
children: [
|
||||
Container(
|
||||
width: 110,
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Text(
|
||||
'Fruit',
|
||||
style: TextStyle(
|
||||
fontSize: 20,
|
||||
fontWeight: FontWeight.bold,
|
||||
),
|
||||
),
|
||||
SizedBox(height: 10,),
|
||||
Text(
|
||||
'140g',
|
||||
style: TextStyle(
|
||||
fontSize: 18,
|
||||
color: Colors.blueGrey[300],
|
||||
),
|
||||
),
|
||||
SizedBox(height: 30,),
|
||||
Text(
|
||||
'\$1.65',
|
||||
style: TextStyle(
|
||||
fontSize: 22,
|
||||
fontWeight: FontWeight.bold,
|
||||
color: Colors.deepOrange,
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
Container(
|
||||
width: 50,
|
||||
height: 80,
|
||||
margin: EdgeInsets.only(top: 20),
|
||||
child: Container(
|
||||
decoration: BoxDecoration(
|
||||
borderRadius: BorderRadius.circular(10),
|
||||
image: DecorationImage(
|
||||
fit: BoxFit.cover,
|
||||
image: NetworkImage('https://images.pexels.com/photos/1435735/pexels-photo-1435735.jpeg?auto=compress&cs=tinysrgb&dpr=2&h=750&w=1260'),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
SizedBox(height: 10,),
|
||||
Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
Container(
|
||||
width: 190,
|
||||
height: 140,
|
||||
child: Card(
|
||||
elevation: 5,
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.all(10.0),
|
||||
child: Row(
|
||||
children: [
|
||||
Container(
|
||||
width: 110,
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Text(
|
||||
'Cho Cafe',
|
||||
style: TextStyle(
|
||||
fontSize: 20,
|
||||
fontWeight: FontWeight.bold,
|
||||
),
|
||||
),
|
||||
SizedBox(height: 10,),
|
||||
Text(
|
||||
'50g',
|
||||
style: TextStyle(
|
||||
fontSize: 18,
|
||||
color: Colors.blueGrey[300],
|
||||
),
|
||||
),
|
||||
SizedBox(height: 30,),
|
||||
Text(
|
||||
'\$0.75',
|
||||
style: TextStyle(
|
||||
fontSize: 22,
|
||||
fontWeight: FontWeight.bold,
|
||||
color: Colors.deepOrange,
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
Container(
|
||||
width: 50,
|
||||
height: 80,
|
||||
margin: EdgeInsets.only(top: 20),
|
||||
child: Container(
|
||||
decoration: BoxDecoration(
|
||||
borderRadius: BorderRadius.circular(10),
|
||||
image: DecorationImage(
|
||||
fit: BoxFit.cover,
|
||||
image: NetworkImage('https://images.pexels.com/photos/3206433/pexels-photo-3206433.jpeg?auto=compress&cs=tinysrgb&dpr=2&h=750&w=1260'),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
Container(
|
||||
width: 190,
|
||||
height: 140,
|
||||
child: Card(
|
||||
elevation: 5,
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.all(10.0),
|
||||
child: Row(
|
||||
children: [
|
||||
Container(
|
||||
width: 110,
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Text(
|
||||
'Che Soup',
|
||||
style: TextStyle(
|
||||
fontSize: 20,
|
||||
fontWeight: FontWeight.bold,
|
||||
),
|
||||
),
|
||||
SizedBox(height: 10,),
|
||||
Text(
|
||||
'90g',
|
||||
style: TextStyle(
|
||||
fontSize: 18,
|
||||
color: Colors.blueGrey[300],
|
||||
),
|
||||
),
|
||||
SizedBox(height: 30,),
|
||||
Text(
|
||||
'\$2.75',
|
||||
style: TextStyle(
|
||||
fontSize: 22,
|
||||
fontWeight: FontWeight.bold,
|
||||
color: Colors.deepOrange,
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
Container(
|
||||
width: 50,
|
||||
height: 80,
|
||||
margin: EdgeInsets.only(top: 20),
|
||||
child: Container(
|
||||
decoration: BoxDecoration(
|
||||
borderRadius: BorderRadius.circular(10),
|
||||
image: DecorationImage(
|
||||
fit: BoxFit.cover,
|
||||
image: NetworkImage('https://images.pexels.com/photos/3662104/pexels-photo-3662104.jpeg?auto=compress&cs=tinysrgb&dpr=2&h=750&w=1260'),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
SizedBox(height: 10,),
|
||||
Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
Container(
|
||||
width: 190,
|
||||
height: 140,
|
||||
child: Card(
|
||||
elevation: 5,
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.all(10.0),
|
||||
child: Row(
|
||||
children: [
|
||||
Container(
|
||||
width: 110,
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Text(
|
||||
'Nat Milk',
|
||||
style: TextStyle(
|
||||
fontSize: 20,
|
||||
fontWeight: FontWeight.bold,
|
||||
),
|
||||
),
|
||||
SizedBox(height: 10,),
|
||||
Text(
|
||||
'80g',
|
||||
style: TextStyle(
|
||||
fontSize: 18,
|
||||
color: Colors.blueGrey[300],
|
||||
),
|
||||
),
|
||||
SizedBox(height: 30,),
|
||||
Text(
|
||||
'\$1.85',
|
||||
style: TextStyle(
|
||||
fontSize: 22,
|
||||
fontWeight: FontWeight.bold,
|
||||
color: Colors.deepOrange,
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
Container(
|
||||
width: 50,
|
||||
height: 80,
|
||||
margin: EdgeInsets.only(top: 20),
|
||||
child: Container(
|
||||
decoration: BoxDecoration(
|
||||
borderRadius: BorderRadius.circular(10),
|
||||
image: DecorationImage(
|
||||
fit: BoxFit.cover,
|
||||
image: NetworkImage('https://images.pexels.com/photos/1435706/pexels-photo-1435706.jpeg?auto=compress&cs=tinysrgb&dpr=2&h=750&w=1260'),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
Container(
|
||||
width: 190,
|
||||
height: 140,
|
||||
child: Card(
|
||||
elevation: 5,
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.all(10.0),
|
||||
child: Row(
|
||||
children: [
|
||||
Container(
|
||||
width: 110,
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Text(
|
||||
'Cho Cake',
|
||||
style: TextStyle(
|
||||
fontSize: 20,
|
||||
fontWeight: FontWeight.bold,
|
||||
),
|
||||
),
|
||||
SizedBox(height: 10,),
|
||||
Text(
|
||||
'120g',
|
||||
style: TextStyle(
|
||||
fontSize: 18,
|
||||
color: Colors.blueGrey[300],
|
||||
),
|
||||
),
|
||||
SizedBox(height: 30,),
|
||||
Text(
|
||||
'\$1.95',
|
||||
style: TextStyle(
|
||||
fontSize: 22,
|
||||
fontWeight: FontWeight.bold,
|
||||
color: Colors.deepOrange,
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
Container(
|
||||
width: 50,
|
||||
height: 80,
|
||||
margin: EdgeInsets.only(top: 20),
|
||||
child: Container(
|
||||
decoration: BoxDecoration(
|
||||
borderRadius: BorderRadius.circular(10),
|
||||
image: DecorationImage(
|
||||
fit: BoxFit.cover,
|
||||
image: NetworkImage('https://images.pexels.com/photos/1998635/pexels-photo-1998635.jpeg?auto=compress&cs=tinysrgb&dpr=2&h=750&w=1260'),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
104
lib/screens/login_screen.dart
Normal file
104
lib/screens/login_screen.dart
Normal file
@@ -0,0 +1,104 @@
|
||||
import 'package:Mobile_POS/main.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
class LoginScreen extends StatefulWidget {
|
||||
@override
|
||||
_LoginScreenState createState() => _LoginScreenState();
|
||||
}
|
||||
|
||||
class _LoginScreenState extends State<LoginScreen> {
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Scaffold(
|
||||
body: SingleChildScrollView(
|
||||
child: Container(
|
||||
width: double.infinity,
|
||||
padding: EdgeInsets.symmetric(horizontal: 20),
|
||||
color: Colors.deepOrange,
|
||||
child: Column(
|
||||
children: [
|
||||
SizedBox(height: 100,),
|
||||
Icon(
|
||||
Icons.food_bank_outlined,
|
||||
size: 200,
|
||||
color: Colors.white,
|
||||
),
|
||||
Text(
|
||||
'Simon\'s BBQ Team',
|
||||
style: TextStyle(
|
||||
fontSize: 24,
|
||||
color: Colors.white,
|
||||
decoration: TextDecoration.none
|
||||
),
|
||||
),
|
||||
SizedBox(height: 30,),
|
||||
TextField(
|
||||
decoration: InputDecoration(
|
||||
labelText: 'Email or Username',
|
||||
labelStyle: TextStyle(
|
||||
fontSize: 24,
|
||||
),
|
||||
filled: true,
|
||||
fillColor: Colors.white38,
|
||||
),
|
||||
),
|
||||
SizedBox(height: 10,),
|
||||
TextField(
|
||||
decoration: InputDecoration(
|
||||
labelText: 'Password',
|
||||
labelStyle: TextStyle(
|
||||
fontSize: 24,
|
||||
),
|
||||
filled: true,
|
||||
fillColor: Colors.white38,
|
||||
),
|
||||
obscureText: true,
|
||||
),
|
||||
SizedBox(height: 30,),
|
||||
Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceAround,
|
||||
children: [
|
||||
RaisedButton(
|
||||
color: Colors.green,
|
||||
onPressed: (){
|
||||
Navigator.push(context, MaterialPageRoute(builder: (context) => MyHomePage()));
|
||||
},
|
||||
child: Container(
|
||||
child: Row(
|
||||
children: [
|
||||
Icon(Icons.login),
|
||||
Container(
|
||||
width: 5,
|
||||
height: 5,
|
||||
),
|
||||
Text('Login'),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
RaisedButton(
|
||||
color: Colors.amberAccent,
|
||||
onPressed: (){},
|
||||
child: Container(
|
||||
child: Row(
|
||||
children: [
|
||||
Icon(Icons.exit_to_app),
|
||||
Container(
|
||||
width: 5,
|
||||
height: 5,
|
||||
),
|
||||
Text('Exit'),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
SizedBox(height: 108,)
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user