From 9d85e5c572b1c591e288b681c988b19ef26a6ed6 Mon Sep 17 00:00:00 2001 From: vamshi Date: Sun, 22 Sep 2019 21:10:55 +0530 Subject: [PATCH] Changelog v1.9.6 --- android/gradle.properties | 4 +- ios/Flutter/flutter_export_environment.sh | 10 + lib/events.dart | 99 ++++---- lib/events/Dancing/dancing.dart | 3 +- lib/events/Dancing/dm.dart | 8 +- lib/events/FashionShow/dm.dart | 288 ++++++++++++++++++++++ lib/events/FashionShow/fs.dart | 60 +++++ lib/events/MadAds/dm.dart | 288 ++++++++++++++++++++++ lib/events/MadAds/ma.dart | 60 +++++ lib/events/Mr.Mrs.Fresher/dm.dart | 288 ++++++++++++++++++++++ lib/events/Mr.Mrs.Fresher/mmf.dart | 60 +++++ lib/events/{ => Singing}/dm.dart | 17 +- lib/events/{ => Singing}/singing.dart | 1 + lib/events/StandUp/dm.dart | 288 ++++++++++++++++++++++ lib/events/StandUp/su.dart | 60 +++++ lib/mainstage.dart | 93 +++---- lib/page0.dart | 70 ++++++ lib/page1.dart | 52 ++++ pubspec.lock | 58 ++++- 19 files changed, 1684 insertions(+), 123 deletions(-) create mode 100644 ios/Flutter/flutter_export_environment.sh create mode 100644 lib/events/FashionShow/dm.dart create mode 100644 lib/events/FashionShow/fs.dart create mode 100644 lib/events/MadAds/dm.dart create mode 100644 lib/events/MadAds/ma.dart create mode 100644 lib/events/Mr.Mrs.Fresher/dm.dart create mode 100644 lib/events/Mr.Mrs.Fresher/mmf.dart rename lib/events/{ => Singing}/dm.dart (93%) rename lib/events/{ => Singing}/singing.dart (94%) create mode 100644 lib/events/StandUp/dm.dart create mode 100644 lib/events/StandUp/su.dart create mode 100644 lib/page0.dart create mode 100644 lib/page1.dart diff --git a/android/gradle.properties b/android/gradle.properties index 332ca68..d099911 100644 --- a/android/gradle.properties +++ b/android/gradle.properties @@ -1,4 +1,4 @@ org.gradle.jvmargs=-Xmx1536M - android.enableJetifier=true -android.useAndroidX=true \ No newline at end of file +android.useAndroidX=true +android.enableR8=true diff --git a/ios/Flutter/flutter_export_environment.sh b/ios/Flutter/flutter_export_environment.sh new file mode 100644 index 0000000..45e1a11 --- /dev/null +++ b/ios/Flutter/flutter_export_environment.sh @@ -0,0 +1,10 @@ +#!/bin/sh +# This is a generated file; do not edit or check into version control. +export "FLUTTER_ROOT=G:\SW\Flutter\SDK\flutter" +export "FLUTTER_APPLICATION_PATH=F:\Android Projects\fest_management" +export "FLUTTER_TARGET=lib\main.dart" +export "FLUTTER_BUILD_DIR=build" +export "SYMROOT=${SOURCE_ROOT}/../build\ios" +export "FLUTTER_FRAMEWORK_DIR=G:\SW\Flutter\SDK\flutter\bin\cache\artifacts\engine\ios" +export "FLUTTER_BUILD_NAME=1.9.2" +export "FLUTTER_BUILD_NUMBER=5" diff --git a/lib/events.dart b/lib/events.dart index c77ed2f..463ed33 100644 --- a/lib/events.dart +++ b/lib/events.dart @@ -1,3 +1,4 @@ +import 'package:fest_management/page0.dart'; import 'package:fest_management/sports.dart'; import 'package:fest_management/technical.dart'; import 'package:flutter/material.dart'; @@ -5,6 +6,7 @@ import 'package:flutter/material.dart'; import 'gaming.dart'; import 'mainstage.dart'; import 'offstage.dart'; +import 'page1.dart'; class events extends StatefulWidget { @override @@ -12,56 +14,61 @@ class events extends StatefulWidget { } class _eventsState extends State { - @override - Widget build(BuildContext context) { - return Container( - decoration: BoxDecoration( - image: DecorationImage( - image: AssetImage("images/events.jpg"), - fit: BoxFit.cover, + + final controller = PageController(initialPage: 0); + + final PageStorageBucket bucket = PageStorageBucket(); + final List pages = [ + page0( + key: PageStorageKey('Page1'), + ), + page1( + key: PageStorageKey('Page2'), + ), + ]; + + int _selectedIndex = 0; + Widget _bottomNavigationBar(int selectedIndex) => BottomNavigationBar( + onTap: (int index) => setState(() => _selectedIndex = index), + currentIndex: selectedIndex, + items: const [ + BottomNavigationBarItem( + icon: Icon( + Icons.home, + color: Colors.black, + ), + title: Text( + "Events", + style: TextStyle(color: Colors.black), ), ), - child: Center( - child: SafeArea( - child: Container( - width: MediaQuery.of(context).size.width / 1.05, - height: MediaQuery.of(context).size.height / 1.05, - child: Card( - shape: RoundedRectangleBorder( - borderRadius: BorderRadius.circular(30.0)), - child: Center( - child: SingleChildScrollView( - child: Wrap( - runAlignment: WrapAlignment.spaceEvenly, - children: [ - Padding( - padding: const EdgeInsets.all(8.0), - child: mainstage(), - ), - Padding( - padding: const EdgeInsets.all(8.0), - child: offstage(), - ), - Padding( - padding: const EdgeInsets.all(8.0), - child: technical(), - ), - Padding( - padding: const EdgeInsets.all(8.0), - child: gaming(), - ), - Padding( - padding: const EdgeInsets.all(8.0), - child: sports(), - ), - ], - ), - ), - ), - ), - ), + BottomNavigationBarItem( + icon: Icon( + Icons.search, + color: Colors.black, + ), + title: Text( + "History", + style: TextStyle(color: Colors.black), ), ), + + ], + ); + @override + Widget build(BuildContext context) { + return Scaffold( + bottomNavigationBar: _bottomNavigationBar(_selectedIndex), + + appBar: AppBar( + backgroundColor: Color(0xff000000), + title: Text("Fest Management"), + centerTitle: true, + ), + body: PageStorage( + child: pages[_selectedIndex], + bucket: bucket, + ), ); } } diff --git a/lib/events/Dancing/dancing.dart b/lib/events/Dancing/dancing.dart index f9dd9d9..1a916fd 100644 --- a/lib/events/Dancing/dancing.dart +++ b/lib/events/Dancing/dancing.dart @@ -11,7 +11,7 @@ class _dancingState extends State { @override Widget build(BuildContext context) { return Scaffold( - appBar: AppBar(title: Text("Singing"), toolbarOpacity: 1, backgroundColor: Color(0xff000000), centerTitle: true,), + appBar: AppBar(title: Text("Dancing"), toolbarOpacity: 1, backgroundColor: Color(0xff000000), centerTitle: true,), body: Container( decoration: BoxDecoration( @@ -28,6 +28,7 @@ class _dancingState extends State { width: MediaQuery.of(context).size.width / 1.05, height: MediaQuery.of(context).size.height / 1.05, child: Card( + color: Color(0x99ffffff), shape: RoundedRectangleBorder( borderRadius: BorderRadius.circular(30.0)), child: Flex(direction: Axis.vertical, children: [Expanded( diff --git a/lib/events/Dancing/dm.dart b/lib/events/Dancing/dm.dart index 86786d5..3eb489e 100644 --- a/lib/events/Dancing/dm.dart +++ b/lib/events/Dancing/dm.dart @@ -1,6 +1,6 @@ import 'package:flutter/material.dart'; import 'package:cloud_firestore/cloud_firestore.dart'; -import 'package:fluttertoast/fluttertoast.dart'; +import 'package:firebase_auth/firebase_auth.dart'; class dm extends StatefulWidget { @override @@ -242,13 +242,15 @@ class _dmState extends State { } submite() async { + final FirebaseUser user = await FirebaseAuth.instance.currentUser(); + print(_nameCon.text + _phCon.text + _itemSel + _slider.toInt().toString()); if (_nameCon.text != "" && _phCon.text != "") { await Firestore.instance .collection("Main Stage") .document("Dancing") - .collection(DateTime.now().toString()) - .document() + .collection(user.email) + .document(DateTime.now().toString()) .setData({ 'Name': _nameCon.text, 'Phone': _phCon.text, diff --git a/lib/events/FashionShow/dm.dart b/lib/events/FashionShow/dm.dart new file mode 100644 index 0000000..c778e97 --- /dev/null +++ b/lib/events/FashionShow/dm.dart @@ -0,0 +1,288 @@ +import 'package:flutter/material.dart'; +import 'package:cloud_firestore/cloud_firestore.dart'; +import 'package:firebase_auth/firebase_auth.dart'; + +class dm extends StatefulWidget { + @override + _dmState createState() => _dmState(); +} + +class _dmState extends State { + var _rates = ['Male', 'Female']; + var _itemSel = "Male"; + TextEditingController _nameCon = new TextEditingController(); + TextEditingController _phCon = new TextEditingController(); + double _slider = 1.0; + + @override + Widget build(BuildContext context) { + return Column( + children: [ + Padding( + padding: const EdgeInsets.all(8.0), + child: Text( + "Description", + style: TextStyle(fontSize: 40.0), + ), + ), + Padding( + padding: const EdgeInsets.all(8.0), + child: Text( + "An amazing event about Dancing", + style: TextStyle(fontSize: 25), + ), + ), + Padding( + padding: const EdgeInsets.all(8.0), + child: Text( + "Rules", + style: TextStyle(fontSize: 35.0), + ), + ), + Column( + children: [ + Text( + "> 6 in a team", + style: TextStyle(fontSize: 20.0), + ), + Text( + "> karaoke must be provided in advance", + style: TextStyle(fontSize: 20.0), + ), + ], + ), + Column( + children: [ + Padding( + padding: const EdgeInsets.all(8.0), + child: Text( + "Fee", + style: TextStyle(fontSize: 35.0), + ), + ), + Text( + "₹ 100 per head", + style: TextStyle(fontSize: 20.0), + ), + Text( + "₹ 500 per Team Of 6", + style: TextStyle(fontSize: 20.0), + ), + ], + ), + Divider(), + SingleChildScrollView( + child: Form( + child: UI(), + autovalidate: true, + ), + ) + ], + ); + } + + void _onDrop(String newValueSelected) { + setState(() { + this._itemSel = newValueSelected; + }); + } + + Widget UI() { + return Container( + child: Column( + children: [ + Text( + "Registration", + style: TextStyle(fontSize: 30.0), + ), + Padding( + padding: const EdgeInsets.all(10.0), + child: TextFormField( + validator: (String arg) { + if (arg.length == 0) + return 'Name Required'; + else + return null; + }, + controller: _nameCon, + textCapitalization: TextCapitalization.characters, + keyboardType: TextInputType.text, + decoration: InputDecoration( + labelText: 'Name', + hintText: 'Enter Your Name [Capital]', + border: OutlineInputBorder( + borderRadius: BorderRadius.circular(5.0))), + ), + ), + Padding( + padding: const EdgeInsets.all(10.0), + child: TextFormField( + validator: (String arg) { + if (arg.length != 10) + return 'Please Enter 10 Digit Phone Number'; + else + return null; + }, + controller: _phCon, + textCapitalization: TextCapitalization.characters, + maxLength: 10, + keyboardType: TextInputType.number, + decoration: InputDecoration( + labelText: 'Phone Number', + hintText: 'Enter Your Phone Number', + border: OutlineInputBorder( + borderRadius: BorderRadius.circular(5.0))), + ), + ), + Padding( + padding: EdgeInsets.all(8.0), + child: Column( + mainAxisAlignment: MainAxisAlignment.spaceEvenly, + children: [ + Text("No. Of Participants"), + Slider( + value: _slider, + onChanged: (double values) { + setState(() { + _slider = values; + }); + }, + divisions: 5, + activeColor: Colors.blue, + label: _slider.toInt().toString(), + max: 6, + min: 1, + ) + ], + ), + ), + Padding( + padding: EdgeInsets.all(10.0), + child: Container( + width: MediaQuery.of(context).size.width / 2, + child: Row( + mainAxisAlignment: MainAxisAlignment.spaceEvenly, + children: [ + Padding( + padding: const EdgeInsets.all(8.0), + child: Text("Gender"), + ), + Padding( + padding: const EdgeInsets.all(8.0), + child: DropdownButton( + hint: Text("Gender"), + items: _rates.map((String value) { + return DropdownMenuItem( + value: value, + child: Text(value), + ); + }).toList(), + value: _itemSel, + onChanged: (String newValueSelected) { + _onDrop(newValueSelected); + }, + ), + ), + ], + ), + )), + Padding( + padding: EdgeInsets.all(10.0), + child: Row( + mainAxisAlignment: MainAxisAlignment.spaceEvenly, + children: [ + Container( + width: MediaQuery.of(context).size.width / 3, + child: Padding( + padding: EdgeInsets.all(8.0), + child: FlatButton( + color: Color(0xff001EBA), + shape: RoundedRectangleBorder( + borderRadius: BorderRadius.all( + Radius.circular(50), + ), + ), + onPressed: () { + submite(); + }, + child: Text( + "Submit", + style: TextStyle(color: Colors.white), + ), + ), + ), + ), + Container( + width: MediaQuery.of(context).size.width / 3, + child: Padding( + padding: EdgeInsets.all(8.0), + child: FlatButton( + shape: RoundedRectangleBorder( + borderRadius: BorderRadius.all( + Radius.circular(50), + ), + ), + color: Colors.red, + onPressed: () { + Navigator.pop(context); + }, + child: Text( + "Cancel", + style: TextStyle(color: Colors.white), + ), + ), + ), + ), + ], + ), + ) + ], + ), + ); + } + + submite() async { + final FirebaseUser user = await FirebaseAuth.instance.currentUser(); + + print(_nameCon.text + _phCon.text + _itemSel + _slider.toInt().toString()); + if (_nameCon.text != "" && _phCon.text != "") { + await Firestore.instance + .collection("Main Stage") + .document("Fashion Show") + .collection(user.email) + .document(DateTime.now().toString()) + .setData({ + 'Name': _nameCon.text, + 'Phone': _phCon.text, + 'Gender': _itemSel, + "No of Members": _slider.toInt() + }); + + Navigator.pop(context); + return showDialog( + context: context, + builder: (context) { + return AlertDialog( + // Retrieve the text the that user has entered by using the + // TextEditingController. + content: Text("Submitted"), + ); + }, + ); + } else { + return showDialog( + context: context, + builder: (context) { + + return AlertDialog( + // Retrieve the text the that user has entered by using the + // TextEditingController. + content: Text("Empty Fields"), + ); + }, + ); + } + + + } +} diff --git a/lib/events/FashionShow/fs.dart b/lib/events/FashionShow/fs.dart new file mode 100644 index 0000000..5028326 --- /dev/null +++ b/lib/events/FashionShow/fs.dart @@ -0,0 +1,60 @@ +import 'package:flutter/material.dart'; +import 'dm.dart'; + +class fs extends StatefulWidget { + @override + _fsState createState() => _fsState(); +} + +class _fsState extends State { + + @override + Widget build(BuildContext context) { + return Scaffold( + appBar: AppBar(title: Text("Fashion Show"), toolbarOpacity: 1, backgroundColor: Color(0xff000000), centerTitle: true,), + body: Container( + + decoration: BoxDecoration( + image: DecorationImage( + image: AssetImage("images/events.jpg"), + fit: BoxFit.cover, + ), + ), + child: Center( + child: SafeArea( + child: Padding( + padding: const EdgeInsets.all(8.0), + child: Container( + width: MediaQuery.of(context).size.width / 1.05, + height: MediaQuery.of(context).size.height / 1.05, + child: Card( + color: Color(0x99ffffff), + shape: RoundedRectangleBorder( + borderRadius: BorderRadius.circular(30.0)), + child: Flex(direction: Axis.vertical, children: [Expanded( + child: new CustomScrollView( + scrollDirection: Axis.vertical, + shrinkWrap: false, + slivers: [ + new SliverPadding( + padding: const EdgeInsets.symmetric(vertical: 0.0), + sliver: new SliverList( + delegate: new SliverChildBuilderDelegate( + (context, index) => new dm(), + childCount: 1, + ), + ), + ), + ], + ), + )],), + ), + ), + ), + ), + ), + ), + ); + } + +} diff --git a/lib/events/MadAds/dm.dart b/lib/events/MadAds/dm.dart new file mode 100644 index 0000000..568e0d4 --- /dev/null +++ b/lib/events/MadAds/dm.dart @@ -0,0 +1,288 @@ +import 'package:flutter/material.dart'; +import 'package:cloud_firestore/cloud_firestore.dart'; +import 'package:firebase_auth/firebase_auth.dart'; + +class dm extends StatefulWidget { + @override + _dmState createState() => _dmState(); +} + +class _dmState extends State { + var _rates = ['Male', 'Female']; + var _itemSel = "Male"; + TextEditingController _nameCon = new TextEditingController(); + TextEditingController _phCon = new TextEditingController(); + double _slider = 1.0; + + @override + Widget build(BuildContext context) { + return Column( + children: [ + Padding( + padding: const EdgeInsets.all(8.0), + child: Text( + "Description", + style: TextStyle(fontSize: 40.0), + ), + ), + Padding( + padding: const EdgeInsets.all(8.0), + child: Text( + "An amazing event about Dancing", + style: TextStyle(fontSize: 25), + ), + ), + Padding( + padding: const EdgeInsets.all(8.0), + child: Text( + "Rules", + style: TextStyle(fontSize: 35.0), + ), + ), + Column( + children: [ + Text( + "> 6 in a team", + style: TextStyle(fontSize: 20.0), + ), + Text( + "> karaoke must be provided in advance", + style: TextStyle(fontSize: 20.0), + ), + ], + ), + Column( + children: [ + Padding( + padding: const EdgeInsets.all(8.0), + child: Text( + "Fee", + style: TextStyle(fontSize: 35.0), + ), + ), + Text( + "₹ 100 per head", + style: TextStyle(fontSize: 20.0), + ), + Text( + "₹ 500 per Team Of 6", + style: TextStyle(fontSize: 20.0), + ), + ], + ), + Divider(), + SingleChildScrollView( + child: Form( + child: UI(), + autovalidate: true, + ), + ) + ], + ); + } + + void _onDrop(String newValueSelected) { + setState(() { + this._itemSel = newValueSelected; + }); + } + + Widget UI() { + return Container( + child: Column( + children: [ + Text( + "Registration", + style: TextStyle(fontSize: 30.0), + ), + Padding( + padding: const EdgeInsets.all(10.0), + child: TextFormField( + validator: (String arg) { + if (arg.length == 0) + return 'Name Required'; + else + return null; + }, + controller: _nameCon, + textCapitalization: TextCapitalization.characters, + keyboardType: TextInputType.text, + decoration: InputDecoration( + labelText: 'Name', + hintText: 'Enter Your Name [Capital]', + border: OutlineInputBorder( + borderRadius: BorderRadius.circular(5.0))), + ), + ), + Padding( + padding: const EdgeInsets.all(10.0), + child: TextFormField( + validator: (String arg) { + if (arg.length != 10) + return 'Please Enter 10 Digit Phone Number'; + else + return null; + }, + controller: _phCon, + textCapitalization: TextCapitalization.characters, + maxLength: 10, + keyboardType: TextInputType.number, + decoration: InputDecoration( + labelText: 'Phone Number', + hintText: 'Enter Your Phone Number', + border: OutlineInputBorder( + borderRadius: BorderRadius.circular(5.0))), + ), + ), + Padding( + padding: EdgeInsets.all(8.0), + child: Column( + mainAxisAlignment: MainAxisAlignment.spaceEvenly, + children: [ + Text("No. Of Participants"), + Slider( + value: _slider, + onChanged: (double values) { + setState(() { + _slider = values; + }); + }, + divisions: 5, + activeColor: Colors.blue, + label: _slider.toInt().toString(), + max: 6, + min: 1, + ) + ], + ), + ), + Padding( + padding: EdgeInsets.all(10.0), + child: Container( + width: MediaQuery.of(context).size.width / 2, + child: Row( + mainAxisAlignment: MainAxisAlignment.spaceEvenly, + children: [ + Padding( + padding: const EdgeInsets.all(8.0), + child: Text("Gender"), + ), + Padding( + padding: const EdgeInsets.all(8.0), + child: DropdownButton( + hint: Text("Gender"), + items: _rates.map((String value) { + return DropdownMenuItem( + value: value, + child: Text(value), + ); + }).toList(), + value: _itemSel, + onChanged: (String newValueSelected) { + _onDrop(newValueSelected); + }, + ), + ), + ], + ), + )), + Padding( + padding: EdgeInsets.all(10.0), + child: Row( + mainAxisAlignment: MainAxisAlignment.spaceEvenly, + children: [ + Container( + width: MediaQuery.of(context).size.width / 3, + child: Padding( + padding: EdgeInsets.all(8.0), + child: FlatButton( + color: Color(0xff001EBA), + shape: RoundedRectangleBorder( + borderRadius: BorderRadius.all( + Radius.circular(50), + ), + ), + onPressed: () { + submite(); + }, + child: Text( + "Submit", + style: TextStyle(color: Colors.white), + ), + ), + ), + ), + Container( + width: MediaQuery.of(context).size.width / 3, + child: Padding( + padding: EdgeInsets.all(8.0), + child: FlatButton( + shape: RoundedRectangleBorder( + borderRadius: BorderRadius.all( + Radius.circular(50), + ), + ), + color: Colors.red, + onPressed: () { + Navigator.pop(context); + }, + child: Text( + "Cancel", + style: TextStyle(color: Colors.white), + ), + ), + ), + ), + ], + ), + ) + ], + ), + ); + } + + submite() async { + final FirebaseUser user = await FirebaseAuth.instance.currentUser(); + + print(_nameCon.text + _phCon.text + _itemSel + _slider.toInt().toString()); + if (_nameCon.text != "" && _phCon.text != "") { + await Firestore.instance + .collection("Main Stage") + .document("Mad Ads") + .collection(user.email) + .document(DateTime.now().toString()) + .setData({ + 'Name': _nameCon.text, + 'Phone': _phCon.text, + 'Gender': _itemSel, + "No of Members": _slider.toInt() + }); + + Navigator.pop(context); + return showDialog( + context: context, + builder: (context) { + return AlertDialog( + // Retrieve the text the that user has entered by using the + // TextEditingController. + content: Text("Submitted"), + ); + }, + ); + } else { + return showDialog( + context: context, + builder: (context) { + + return AlertDialog( + // Retrieve the text the that user has entered by using the + // TextEditingController. + content: Text("Empty Fields"), + ); + }, + ); + } + + + } +} diff --git a/lib/events/MadAds/ma.dart b/lib/events/MadAds/ma.dart new file mode 100644 index 0000000..9709953 --- /dev/null +++ b/lib/events/MadAds/ma.dart @@ -0,0 +1,60 @@ +import 'package:flutter/material.dart'; +import 'dm.dart'; + +class ma extends StatefulWidget { + @override + _maState createState() => _maState(); +} + +class _maState extends State { + + @override + Widget build(BuildContext context) { + return Scaffold( + appBar: AppBar(title: Text("Mad Ads"), toolbarOpacity: 1, backgroundColor: Color(0xff000000), centerTitle: true,), + body: Container( + + decoration: BoxDecoration( + image: DecorationImage( + image: AssetImage("images/events.jpg"), + fit: BoxFit.cover, + ), + ), + child: Center( + child: SafeArea( + child: Padding( + padding: const EdgeInsets.all(8.0), + child: Container( + width: MediaQuery.of(context).size.width / 1.05, + height: MediaQuery.of(context).size.height / 1.05, + child: Card( + color: Color(0x99ffffff), + shape: RoundedRectangleBorder( + borderRadius: BorderRadius.circular(30.0)), + child: Flex(direction: Axis.vertical, children: [Expanded( + child: new CustomScrollView( + scrollDirection: Axis.vertical, + shrinkWrap: false, + slivers: [ + new SliverPadding( + padding: const EdgeInsets.symmetric(vertical: 0.0), + sliver: new SliverList( + delegate: new SliverChildBuilderDelegate( + (context, index) => new dm(), + childCount: 1, + ), + ), + ), + ], + ), + )],), + ), + ), + ), + ), + ), + ), + ); + } + +} diff --git a/lib/events/Mr.Mrs.Fresher/dm.dart b/lib/events/Mr.Mrs.Fresher/dm.dart new file mode 100644 index 0000000..5619009 --- /dev/null +++ b/lib/events/Mr.Mrs.Fresher/dm.dart @@ -0,0 +1,288 @@ +import 'package:flutter/material.dart'; +import 'package:cloud_firestore/cloud_firestore.dart'; +import 'package:firebase_auth/firebase_auth.dart'; + +class dm extends StatefulWidget { + @override + _dmState createState() => _dmState(); +} + +class _dmState extends State { + var _rates = ['Male', 'Female']; + var _itemSel = "Male"; + TextEditingController _nameCon = new TextEditingController(); + TextEditingController _phCon = new TextEditingController(); + double _slider = 1.0; + + @override + Widget build(BuildContext context) { + return Column( + children: [ + Padding( + padding: const EdgeInsets.all(8.0), + child: Text( + "Description", + style: TextStyle(fontSize: 40.0), + ), + ), + Padding( + padding: const EdgeInsets.all(8.0), + child: Text( + "An amazing event about Dancing", + style: TextStyle(fontSize: 25), + ), + ), + Padding( + padding: const EdgeInsets.all(8.0), + child: Text( + "Rules", + style: TextStyle(fontSize: 35.0), + ), + ), + Column( + children: [ + Text( + "> 6 in a team", + style: TextStyle(fontSize: 20.0), + ), + Text( + "> karaoke must be provided in advance", + style: TextStyle(fontSize: 20.0), + ), + ], + ), + Column( + children: [ + Padding( + padding: const EdgeInsets.all(8.0), + child: Text( + "Fee", + style: TextStyle(fontSize: 35.0), + ), + ), + Text( + "₹ 100 per head", + style: TextStyle(fontSize: 20.0), + ), + Text( + "₹ 500 per Team Of 6", + style: TextStyle(fontSize: 20.0), + ), + ], + ), + Divider(), + SingleChildScrollView( + child: Form( + child: UI(), + autovalidate: true, + ), + ) + ], + ); + } + + void _onDrop(String newValueSelected) { + setState(() { + this._itemSel = newValueSelected; + }); + } + + Widget UI() { + return Container( + child: Column( + children: [ + Text( + "Registration", + style: TextStyle(fontSize: 30.0), + ), + Padding( + padding: const EdgeInsets.all(10.0), + child: TextFormField( + validator: (String arg) { + if (arg.length == 0) + return 'Name Required'; + else + return null; + }, + controller: _nameCon, + textCapitalization: TextCapitalization.characters, + keyboardType: TextInputType.text, + decoration: InputDecoration( + labelText: 'Name', + hintText: 'Enter Your Name [Capital]', + border: OutlineInputBorder( + borderRadius: BorderRadius.circular(5.0))), + ), + ), + Padding( + padding: const EdgeInsets.all(10.0), + child: TextFormField( + validator: (String arg) { + if (arg.length != 10) + return 'Please Enter 10 Digit Phone Number'; + else + return null; + }, + controller: _phCon, + textCapitalization: TextCapitalization.characters, + maxLength: 10, + keyboardType: TextInputType.number, + decoration: InputDecoration( + labelText: 'Phone Number', + hintText: 'Enter Your Phone Number', + border: OutlineInputBorder( + borderRadius: BorderRadius.circular(5.0))), + ), + ), + Padding( + padding: EdgeInsets.all(8.0), + child: Column( + mainAxisAlignment: MainAxisAlignment.spaceEvenly, + children: [ + Text("No. Of Participants"), + Slider( + value: _slider, + onChanged: (double values) { + setState(() { + _slider = values; + }); + }, + divisions: 5, + activeColor: Colors.blue, + label: _slider.toInt().toString(), + max: 6, + min: 1, + ) + ], + ), + ), + Padding( + padding: EdgeInsets.all(10.0), + child: Container( + width: MediaQuery.of(context).size.width / 2, + child: Row( + mainAxisAlignment: MainAxisAlignment.spaceEvenly, + children: [ + Padding( + padding: const EdgeInsets.all(8.0), + child: Text("Gender"), + ), + Padding( + padding: const EdgeInsets.all(8.0), + child: DropdownButton( + hint: Text("Gender"), + items: _rates.map((String value) { + return DropdownMenuItem( + value: value, + child: Text(value), + ); + }).toList(), + value: _itemSel, + onChanged: (String newValueSelected) { + _onDrop(newValueSelected); + }, + ), + ), + ], + ), + )), + Padding( + padding: EdgeInsets.all(10.0), + child: Row( + mainAxisAlignment: MainAxisAlignment.spaceEvenly, + children: [ + Container( + width: MediaQuery.of(context).size.width / 3, + child: Padding( + padding: EdgeInsets.all(8.0), + child: FlatButton( + color: Color(0xff001EBA), + shape: RoundedRectangleBorder( + borderRadius: BorderRadius.all( + Radius.circular(50), + ), + ), + onPressed: () { + submite(); + }, + child: Text( + "Submit", + style: TextStyle(color: Colors.white), + ), + ), + ), + ), + Container( + width: MediaQuery.of(context).size.width / 3, + child: Padding( + padding: EdgeInsets.all(8.0), + child: FlatButton( + shape: RoundedRectangleBorder( + borderRadius: BorderRadius.all( + Radius.circular(50), + ), + ), + color: Colors.red, + onPressed: () { + Navigator.pop(context); + }, + child: Text( + "Cancel", + style: TextStyle(color: Colors.white), + ), + ), + ), + ), + ], + ), + ) + ], + ), + ); + } + + submite() async { + final FirebaseUser user = await FirebaseAuth.instance.currentUser(); + + print(_nameCon.text + _phCon.text + _itemSel + _slider.toInt().toString()); + if (_nameCon.text != "" && _phCon.text != "") { + await Firestore.instance + .collection("Main Stage") + .document("Mr. and Ms. Fresher") + .collection(user.email) + .document(DateTime.now().toString()) + .setData({ + 'Name': _nameCon.text, + 'Phone': _phCon.text, + 'Gender': _itemSel, + "No of Members": _slider.toInt() + }); + + Navigator.pop(context); + return showDialog( + context: context, + builder: (context) { + return AlertDialog( + // Retrieve the text the that user has entered by using the + // TextEditingController. + content: Text("Submitted"), + ); + }, + ); + } else { + return showDialog( + context: context, + builder: (context) { + + return AlertDialog( + // Retrieve the text the that user has entered by using the + // TextEditingController. + content: Text("Empty Fields"), + ); + }, + ); + } + + + } +} diff --git a/lib/events/Mr.Mrs.Fresher/mmf.dart b/lib/events/Mr.Mrs.Fresher/mmf.dart new file mode 100644 index 0000000..fed3d0d --- /dev/null +++ b/lib/events/Mr.Mrs.Fresher/mmf.dart @@ -0,0 +1,60 @@ +import 'package:flutter/material.dart'; +import 'dm.dart'; + +class mmf extends StatefulWidget { + @override + _mmfState createState() => _mmfState(); +} + +class _mmfState extends State { + + @override + Widget build(BuildContext context) { + return Scaffold( + appBar: AppBar(title: Text("Mr. And Ms. Fresher"), toolbarOpacity: 1, backgroundColor: Color(0xff000000), centerTitle: true,), + body: Container( + + decoration: BoxDecoration( + image: DecorationImage( + image: AssetImage("images/events.jpg"), + fit: BoxFit.cover, + ), + ), + child: Center( + child: SafeArea( + child: Padding( + padding: const EdgeInsets.all(8.0), + child: Container( + width: MediaQuery.of(context).size.width / 1.05, + height: MediaQuery.of(context).size.height / 1.05, + child: Card( + color: Color(0x99ffffff), + shape: RoundedRectangleBorder( + borderRadius: BorderRadius.circular(30.0)), + child: Flex(direction: Axis.vertical, children: [Expanded( + child: new CustomScrollView( + scrollDirection: Axis.vertical, + shrinkWrap: false, + slivers: [ + new SliverPadding( + padding: const EdgeInsets.symmetric(vertical: 0.0), + sliver: new SliverList( + delegate: new SliverChildBuilderDelegate( + (context, index) => new dm(), + childCount: 1, + ), + ), + ), + ], + ), + )],), + ), + ), + ), + ), + ), + ), + ); + } + +} diff --git a/lib/events/dm.dart b/lib/events/Singing/dm.dart similarity index 93% rename from lib/events/dm.dart rename to lib/events/Singing/dm.dart index 002fe6b..8151856 100644 --- a/lib/events/dm.dart +++ b/lib/events/Singing/dm.dart @@ -1,6 +1,7 @@ import 'package:flutter/material.dart'; import 'package:cloud_firestore/cloud_firestore.dart'; import 'package:fluttertoast/fluttertoast.dart'; +import 'package:firebase_auth/firebase_auth.dart'; class dm extends StatefulWidget { @override @@ -8,6 +9,7 @@ class dm extends StatefulWidget { } class _dmState extends State { + var _rates = ['Male', 'Female']; var _itemSel = "Male"; TextEditingController _nameCon = new TextEditingController(); @@ -98,6 +100,7 @@ class _dmState extends State { Padding( padding: const EdgeInsets.all(10.0), child: TextFormField( + validator: (String arg) { if (arg.length == 0) return 'Name Required'; @@ -149,7 +152,7 @@ class _dmState extends State { }, divisions: 1, activeColor: Colors.blue, - label: _slider.toString(), + label: _slider.toInt().toString(), max: 2, min: 1, ) @@ -242,19 +245,24 @@ class _dmState extends State { } submite() async { + final FirebaseUser user = await FirebaseAuth.instance.currentUser(); + + print("********************************"); + print(user.email); print(_nameCon.text + _phCon.text + _itemSel + _slider.toInt().toString()); if (_nameCon.text != "" && _phCon.text != "") { await Firestore.instance .collection("Main Stage") .document("Singing") - .collection(DateTime.now().toString()) - .document() + .collection(user.email) + .document(DateTime.now().toString()) .setData({ 'Name': _nameCon.text, 'Phone': _phCon.text, 'Gender': _itemSel, "No of Members": _slider.toInt() }); + Navigator.pop(context); return showDialog( context: context, builder: (context) { @@ -277,8 +285,5 @@ class _dmState extends State { }, ); } - Navigator.pop(context); - - return null; } } diff --git a/lib/events/singing.dart b/lib/events/Singing/singing.dart similarity index 94% rename from lib/events/singing.dart rename to lib/events/Singing/singing.dart index c346800..fb96285 100644 --- a/lib/events/singing.dart +++ b/lib/events/Singing/singing.dart @@ -28,6 +28,7 @@ class _singingState extends State { width: MediaQuery.of(context).size.width / 1.05, height: MediaQuery.of(context).size.height / 1.05, child: Card( + color: Color(0x99ffffff), shape: RoundedRectangleBorder( borderRadius: BorderRadius.circular(30.0)), child: Flex(direction: Axis.vertical, children: [Expanded( diff --git a/lib/events/StandUp/dm.dart b/lib/events/StandUp/dm.dart new file mode 100644 index 0000000..7ee98d2 --- /dev/null +++ b/lib/events/StandUp/dm.dart @@ -0,0 +1,288 @@ +import 'package:flutter/material.dart'; +import 'package:cloud_firestore/cloud_firestore.dart'; +import 'package:firebase_auth/firebase_auth.dart'; + +class dm extends StatefulWidget { + @override + _dmState createState() => _dmState(); +} + +class _dmState extends State { + var _rates = ['Male', 'Female']; + var _itemSel = "Male"; + TextEditingController _nameCon = new TextEditingController(); + TextEditingController _phCon = new TextEditingController(); + double _slider = 1.0; + + @override + Widget build(BuildContext context) { + return Column( + children: [ + Padding( + padding: const EdgeInsets.all(8.0), + child: Text( + "Description", + style: TextStyle(fontSize: 40.0), + ), + ), + Padding( + padding: const EdgeInsets.all(8.0), + child: Text( + "An amazing event about Dancing", + style: TextStyle(fontSize: 25), + ), + ), + Padding( + padding: const EdgeInsets.all(8.0), + child: Text( + "Rules", + style: TextStyle(fontSize: 35.0), + ), + ), + Column( + children: [ + Text( + "> 6 in a team", + style: TextStyle(fontSize: 20.0), + ), + Text( + "> karaoke must be provided in advance", + style: TextStyle(fontSize: 20.0), + ), + ], + ), + Column( + children: [ + Padding( + padding: const EdgeInsets.all(8.0), + child: Text( + "Fee", + style: TextStyle(fontSize: 35.0), + ), + ), + Text( + "₹ 100 per head", + style: TextStyle(fontSize: 20.0), + ), + Text( + "₹ 500 per Team Of 6", + style: TextStyle(fontSize: 20.0), + ), + ], + ), + Divider(), + SingleChildScrollView( + child: Form( + child: UI(), + autovalidate: true, + ), + ) + ], + ); + } + + void _onDrop(String newValueSelected) { + setState(() { + this._itemSel = newValueSelected; + }); + } + + Widget UI() { + return Container( + child: Column( + children: [ + Text( + "Registration", + style: TextStyle(fontSize: 30.0), + ), + Padding( + padding: const EdgeInsets.all(10.0), + child: TextFormField( + validator: (String arg) { + if (arg.length == 0) + return 'Name Required'; + else + return null; + }, + controller: _nameCon, + textCapitalization: TextCapitalization.characters, + keyboardType: TextInputType.text, + decoration: InputDecoration( + labelText: 'Name', + hintText: 'Enter Your Name [Capital]', + border: OutlineInputBorder( + borderRadius: BorderRadius.circular(5.0))), + ), + ), + Padding( + padding: const EdgeInsets.all(10.0), + child: TextFormField( + validator: (String arg) { + if (arg.length != 10) + return 'Please Enter 10 Digit Phone Number'; + else + return null; + }, + controller: _phCon, + textCapitalization: TextCapitalization.characters, + maxLength: 10, + keyboardType: TextInputType.number, + decoration: InputDecoration( + labelText: 'Phone Number', + hintText: 'Enter Your Phone Number', + border: OutlineInputBorder( + borderRadius: BorderRadius.circular(5.0))), + ), + ), + Padding( + padding: EdgeInsets.all(8.0), + child: Column( + mainAxisAlignment: MainAxisAlignment.spaceEvenly, + children: [ + Text("No. Of Participants"), + Slider( + value: _slider, + onChanged: (double values) { + setState(() { + _slider = values; + }); + }, + divisions: 5, + activeColor: Colors.blue, + label: _slider.toInt().toString(), + max: 6, + min: 1, + ) + ], + ), + ), + Padding( + padding: EdgeInsets.all(10.0), + child: Container( + width: MediaQuery.of(context).size.width / 2, + child: Row( + mainAxisAlignment: MainAxisAlignment.spaceEvenly, + children: [ + Padding( + padding: const EdgeInsets.all(8.0), + child: Text("Gender"), + ), + Padding( + padding: const EdgeInsets.all(8.0), + child: DropdownButton( + hint: Text("Gender"), + items: _rates.map((String value) { + return DropdownMenuItem( + value: value, + child: Text(value), + ); + }).toList(), + value: _itemSel, + onChanged: (String newValueSelected) { + _onDrop(newValueSelected); + }, + ), + ), + ], + ), + )), + Padding( + padding: EdgeInsets.all(10.0), + child: Row( + mainAxisAlignment: MainAxisAlignment.spaceEvenly, + children: [ + Container( + width: MediaQuery.of(context).size.width / 3, + child: Padding( + padding: EdgeInsets.all(8.0), + child: FlatButton( + color: Color(0xff001EBA), + shape: RoundedRectangleBorder( + borderRadius: BorderRadius.all( + Radius.circular(50), + ), + ), + onPressed: () { + submite(); + }, + child: Text( + "Submit", + style: TextStyle(color: Colors.white), + ), + ), + ), + ), + Container( + width: MediaQuery.of(context).size.width / 3, + child: Padding( + padding: EdgeInsets.all(8.0), + child: FlatButton( + shape: RoundedRectangleBorder( + borderRadius: BorderRadius.all( + Radius.circular(50), + ), + ), + color: Colors.red, + onPressed: () { + Navigator.pop(context); + }, + child: Text( + "Cancel", + style: TextStyle(color: Colors.white), + ), + ), + ), + ), + ], + ), + ) + ], + ), + ); + } + + submite() async { + final FirebaseUser user = await FirebaseAuth.instance.currentUser(); + + print(_nameCon.text + _phCon.text + _itemSel + _slider.toInt().toString()); + if (_nameCon.text != "" && _phCon.text != "") { + await Firestore.instance + .collection("Main Stage") + .document("Stand Up Comedy") + .collection(user.email) + .document(DateTime.now().toString()) + .setData({ + 'Name': _nameCon.text, + 'Phone': _phCon.text, + 'Gender': _itemSel, + "No of Members": _slider.toInt() + }); + + Navigator.pop(context); + return showDialog( + context: context, + builder: (context) { + return AlertDialog( + // Retrieve the text the that user has entered by using the + // TextEditingController. + content: Text("Submitted"), + ); + }, + ); + } else { + return showDialog( + context: context, + builder: (context) { + + return AlertDialog( + // Retrieve the text the that user has entered by using the + // TextEditingController. + content: Text("Empty Fields"), + ); + }, + ); + } + + + } +} diff --git a/lib/events/StandUp/su.dart b/lib/events/StandUp/su.dart new file mode 100644 index 0000000..7edfb65 --- /dev/null +++ b/lib/events/StandUp/su.dart @@ -0,0 +1,60 @@ +import 'package:flutter/material.dart'; +import 'dm.dart'; + +class su extends StatefulWidget { + @override + _suState createState() => _suState(); +} + +class _suState extends State { + + @override + Widget build(BuildContext context) { + return Scaffold( + appBar: AppBar(title: Text("Stand Up Comedy"), toolbarOpacity: 1, backgroundColor: Color(0xff000000), centerTitle: true,), + body: Container( + + decoration: BoxDecoration( + image: DecorationImage( + image: AssetImage("images/events.jpg"), + fit: BoxFit.cover, + ), + ), + child: Center( + child: SafeArea( + child: Padding( + padding: const EdgeInsets.all(8.0), + child: Container( + width: MediaQuery.of(context).size.width / 1.05, + height: MediaQuery.of(context).size.height / 1.05, + child: Card( + color: Color(0x99ffffff), + shape: RoundedRectangleBorder( + borderRadius: BorderRadius.circular(30.0)), + child: Flex(direction: Axis.vertical, children: [Expanded( + child: new CustomScrollView( + scrollDirection: Axis.vertical, + shrinkWrap: false, + slivers: [ + new SliverPadding( + padding: const EdgeInsets.symmetric(vertical: 0.0), + sliver: new SliverList( + delegate: new SliverChildBuilderDelegate( + (context, index) => new dm(), + childCount: 1, + ), + ), + ), + ], + ), + )],), + ), + ), + ), + ), + ), + ), + ); + } + +} diff --git a/lib/mainstage.dart b/lib/mainstage.dart index ddaf69b..148c752 100644 --- a/lib/mainstage.dart +++ b/lib/mainstage.dart @@ -1,6 +1,10 @@ import 'package:flutter/material.dart'; -import 'events/singing.dart'; +import 'events/FashionShow/fs.dart'; +import 'events/MadAds/ma.dart'; +import 'events/Mr.Mrs.Fresher/mmf.dart'; +import 'events/StandUp/su.dart'; +import 'events/Singing/singing.dart'; import 'events/Dancing/dancing.dart'; class mainstage extends StatefulWidget { @@ -25,8 +29,9 @@ class _mainstageState extends State { children: [ Container( decoration: BoxDecoration( - borderRadius: BorderRadius.only(topLeft: Radius.circular(20), bottomRight: Radius.circular(20)), - + borderRadius: BorderRadius.only( + topLeft: Radius.circular(20), + bottomRight: Radius.circular(20)), gradient: LinearGradient( // Where the linear gradient begins and ends begin: Alignment.bottomCenter, @@ -52,7 +57,6 @@ class _mainstageState extends State { child: Center( child: FlatButton( onPressed: () { - transport(singing()); }, child: Text( @@ -64,7 +68,9 @@ class _mainstageState extends State { ), Container( decoration: BoxDecoration( - borderRadius: BorderRadius.only(topRight: Radius.circular(20), bottomLeft: Radius.circular(20)), + borderRadius: BorderRadius.only( + topRight: Radius.circular(20), + bottomLeft: Radius.circular(20)), gradient: LinearGradient( // Where the linear gradient begins and ends begin: Alignment.bottomCenter, @@ -109,7 +115,9 @@ class _mainstageState extends State { children: [ Container( decoration: BoxDecoration( - borderRadius: BorderRadius.only(topLeft: Radius.circular(20), bottomRight: Radius.circular(20)), + borderRadius: BorderRadius.only( + topLeft: Radius.circular(20), + bottomRight: Radius.circular(20)), gradient: LinearGradient( // Where the linear gradient begins and ends begin: Alignment.bottomCenter, @@ -134,7 +142,9 @@ class _mainstageState extends State { height: MediaQuery.of(context).size.height / 17, child: Center( child: FlatButton( - onPressed: () {}, + onPressed: () { + transport(mmf()); + }, child: Text( 'Mr. and Ms. Fresher', style: TextStyle(color: Colors.white, fontSize: 18.0), @@ -144,7 +154,9 @@ class _mainstageState extends State { ), Container( decoration: BoxDecoration( - borderRadius: BorderRadius.only(topRight: Radius.circular(20), bottomLeft: Radius.circular(20)), + borderRadius: BorderRadius.only( + topRight: Radius.circular(20), + bottomLeft: Radius.circular(20)), gradient: LinearGradient( // Where the linear gradient begins and ends begin: Alignment.bottomCenter, @@ -169,7 +181,9 @@ class _mainstageState extends State { height: MediaQuery.of(context).size.height / 17, child: Center( child: FlatButton( - onPressed: () {}, + onPressed: () { + transport(fs()); + }, child: Text( 'Fashion Show', style: TextStyle(color: Colors.white, fontSize: 18.0), @@ -187,7 +201,9 @@ class _mainstageState extends State { children: [ Container( decoration: BoxDecoration( - borderRadius: BorderRadius.only(topLeft: Radius.circular(20), bottomRight: Radius.circular(20)), + borderRadius: BorderRadius.only( + topLeft: Radius.circular(20), + bottomRight: Radius.circular(20)), gradient: LinearGradient( // Where the linear gradient begins and ends begin: Alignment.bottomCenter, @@ -212,9 +228,11 @@ class _mainstageState extends State { height: MediaQuery.of(context).size.height / 17, child: Center( child: FlatButton( - onPressed: () {}, + onPressed: () { + transport(ma()); + }, child: Text( - 'DJ Night', + 'Mad Ads', style: TextStyle(color: Colors.white, fontSize: 18.0), ), ), @@ -222,7 +240,9 @@ class _mainstageState extends State { ), Container( decoration: BoxDecoration( - borderRadius: BorderRadius.only(topRight: Radius.circular(20), bottomLeft: Radius.circular(20)), + borderRadius: BorderRadius.only( + topRight: Radius.circular(20), + bottomLeft: Radius.circular(20)), gradient: LinearGradient( // Where the linear gradient begins and ends begin: Alignment.bottomCenter, @@ -247,7 +267,9 @@ class _mainstageState extends State { height: MediaQuery.of(context).size.height / 17, child: Center( child: FlatButton( - onPressed: () {}, + onPressed: () { + transport(su()); + }, child: Text( 'Stand Up Comedy', style: TextStyle(color: Colors.white, fontSize: 18.0), @@ -258,49 +280,6 @@ class _mainstageState extends State { ], ), ), - Padding( - padding: const EdgeInsets.all(8.0), - child: Row( - mainAxisAlignment: MainAxisAlignment.spaceEvenly, - children: [ - Container( - decoration: BoxDecoration( - borderRadius: BorderRadius.circular(100.0), - gradient: LinearGradient( - // Where the linear gradient begins and ends - begin: Alignment.bottomCenter, - end: Alignment.topCenter, - // Add one stop for each color. Stops should increase from 0 to 1 - stops: [0.1, 0.3, 0.5, 0.7, 0.9], - colors: [ - // Colors are easy thanks to Flutter's Colors class. - /*Colors.indigo[800], - Colors.indigo[700], - Colors.indigo[600], - Colors.indigo[500],*/ - Colors.lime[800], - Colors.lime[700], - Colors.lime[600], - Colors.lime[500], - Colors.lime[400], - ], - ), - ), - width: MediaQuery.of(context).size.width / 2.5, - height: MediaQuery.of(context).size.height / 17, - child: Center( - child: FlatButton( - onPressed: () {}, - child: Text( - 'Mad Ads', - style: TextStyle(color: Colors.white, fontSize: 18.0), - ), - ), - ), - ), - ], - ), - ), ], ); } diff --git a/lib/page0.dart b/lib/page0.dart new file mode 100644 index 0000000..60f50ba --- /dev/null +++ b/lib/page0.dart @@ -0,0 +1,70 @@ +import 'package:fest_management/sports.dart'; +import 'package:fest_management/technical.dart'; +import 'package:flutter/material.dart'; + +import 'gaming.dart'; +import 'mainstage.dart'; +import 'offstage.dart'; + +class page0 extends StatefulWidget { + const page0({Key key}) : super(key: key); + @override + _page0State createState() => _page0State(); +} + +class _page0State extends State { + @override + Widget build(BuildContext context) { + return Container( + decoration: BoxDecoration( + image: DecorationImage( + image: AssetImage("images/events.jpg"), + fit: BoxFit.cover, + ), + ), + child: Center( + child: SafeArea( + child: Container( + width: MediaQuery.of(context).size.width / 1.05, + height: MediaQuery.of(context).size.height / 1.05, + child: Card( + color: Color(0x99ffffff), + + shape: RoundedRectangleBorder( + borderRadius: BorderRadius.circular(30.0)), + child: Center( + child: SingleChildScrollView( + child: Wrap( + runAlignment: WrapAlignment.spaceEvenly, + children: [ + Padding( + padding: const EdgeInsets.all(8.0), + child: mainstage(), + ), + Padding( + padding: const EdgeInsets.all(8.0), + child: offstage(), + ), + Padding( + padding: const EdgeInsets.all(8.0), + child: technical(), + ), + Padding( + padding: const EdgeInsets.all(8.0), + child: gaming(), + ), + Padding( + padding: const EdgeInsets.all(8.0), + child: sports(), + ), + ], + ), + ), + ), + ), + ), + ), + ), + ); + } +} diff --git a/lib/page1.dart b/lib/page1.dart new file mode 100644 index 0000000..00c2836 --- /dev/null +++ b/lib/page1.dart @@ -0,0 +1,52 @@ +import 'package:flutter/material.dart'; +import 'package:cloud_firestore/cloud_firestore.dart'; +import 'package:firebase_auth/firebase_auth.dart'; + +class page1 extends StatefulWidget { + const page1({Key key}) : super(key: key); + + @override + _page1State createState() => _page1State(); +} + +class _page1State extends State { + @override + void initState() { + // TODO: implement initState + super.initState(); + some(); + + } + some() async{ + FirebaseUser user = await FirebaseAuth.instance.currentUser(); + QuerySnapshot qs = await Firestore.instance.collection("Main Stage").document("Singing").collection(user.email).getDocuments(); + print(qs.documents[0].data); + } + @override + Widget build(BuildContext context) { + return Container( + decoration: BoxDecoration( + image: DecorationImage( + image: AssetImage("images/login.jpg"), + fit: BoxFit.cover, + ), + ), + child: Center( + child: SizedBox( + width: MediaQuery.of(context).size.width / 1.05, + height: MediaQuery.of(context).size.height / 1.05, + child: Card( + color: Color(0x99ffffff), + shape: RoundedRectangleBorder( + borderRadius: BorderRadius.circular(30.0)), + child: Center( + child: ListView(children: [ + ListTile(title: Text("Hi"),subtitle: Text("Yoo"),) + ],) + ), + ), + ), + ), + ); + } +} diff --git a/pubspec.lock b/pubspec.lock index e2a343c..f4bd191 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -1,6 +1,13 @@ # Generated by pub # See https://dart.dev/tools/pub/glossary#lockfile packages: + archive: + dependency: transitive + description: + name: archive + url: "https://pub.dartlang.org" + source: hosted + version: "2.0.10" args: dependency: transitive description: @@ -14,14 +21,14 @@ packages: name: async url: "https://pub.dartlang.org" source: hosted - version: "2.2.0" + version: "2.3.0" boolean_selector: dependency: transitive description: name: boolean_selector url: "https://pub.dartlang.org" source: hosted - version: "1.0.4" + version: "1.0.5" charcode: dependency: transitive description: @@ -43,6 +50,20 @@ packages: url: "https://pub.dartlang.org" source: hosted version: "1.14.11" + convert: + dependency: transitive + description: + name: convert + url: "https://pub.dartlang.org" + source: hosted + version: "2.1.1" + crypto: + dependency: transitive + description: + name: crypto + url: "https://pub.dartlang.org" + source: hosted + version: "2.1.3" cupertino_icons: dependency: "direct main" description: @@ -88,6 +109,13 @@ packages: url: "https://pub.dartlang.org" source: hosted version: "3.1.3" + image: + dependency: transitive + description: + name: image + url: "https://pub.dartlang.org" + source: hosted + version: "2.1.4" intl: dependency: transitive description: @@ -122,28 +150,35 @@ packages: name: meta url: "https://pub.dartlang.org" source: hosted - version: "1.1.6" + version: "1.1.7" path: dependency: transitive description: name: path url: "https://pub.dartlang.org" source: hosted - version: "1.6.2" + version: "1.6.4" pedantic: dependency: transitive description: name: pedantic url: "https://pub.dartlang.org" source: hosted - version: "1.7.0" + version: "1.8.0+1" + petitparser: + dependency: transitive + description: + name: petitparser + url: "https://pub.dartlang.org" + source: hosted + version: "2.4.0" quiver: dependency: transitive description: name: quiver url: "https://pub.dartlang.org" source: hosted - version: "2.0.3" + version: "2.0.5" sky_engine: dependency: transitive description: flutter @@ -176,7 +211,7 @@ packages: name: string_scanner url: "https://pub.dartlang.org" source: hosted - version: "1.0.4" + version: "1.0.5" term_glyph: dependency: transitive description: @@ -205,6 +240,13 @@ packages: url: "https://pub.dartlang.org" source: hosted version: "2.0.8" + xml: + dependency: transitive + description: + name: xml + url: "https://pub.dartlang.org" + source: hosted + version: "3.5.0" sdks: - dart: ">=2.2.2 <3.0.0" + dart: ">=2.4.0 <3.0.0" flutter: ">=1.5.0 <2.0.0"