diff --git a/.project b/.project new file mode 100644 index 0000000..ba4a2ff --- /dev/null +++ b/.project @@ -0,0 +1,28 @@ + + + forestTreesTagging + Project forestTreesTagging created by Buildship. + + + + + org.eclipse.buildship.core.gradleprojectbuilder + + + + + + org.eclipse.buildship.core.gradleprojectnature + + + + 1622216999284 + + 30 + + org.eclipse.core.resources.regexFilterMatcher + node_modules|.git|__CREATED_BY_JAVA_LANGUAGE_SERVER__ + + + + diff --git a/.settings/org.eclipse.buildship.core.prefs b/.settings/org.eclipse.buildship.core.prefs new file mode 100644 index 0000000..4c54341 --- /dev/null +++ b/.settings/org.eclipse.buildship.core.prefs @@ -0,0 +1,13 @@ +arguments= +auto.sync=false +build.scans.enabled=false +connection.gradle.distribution=GRADLE_DISTRIBUTION(WRAPPER) +connection.project.dir= +eclipse.preferences.version=1 +gradle.user.home= +java.home=C\:/Program Files/Java/jdk-11.0.5 +jvm.arguments= +offline.mode=false +override.workspace.settings=true +show.console.view=true +show.executions.view=true diff --git a/assets/images/onboard_1.png b/assets/images/onboard_1.png new file mode 100644 index 0000000..9182e44 Binary files /dev/null and b/assets/images/onboard_1.png differ diff --git a/assets/images/onboard_2.png b/assets/images/onboard_2.png new file mode 100644 index 0000000..eb321b7 Binary files /dev/null and b/assets/images/onboard_2.png differ diff --git a/assets/images/onboard_3.png b/assets/images/onboard_3.png new file mode 100644 index 0000000..fd6b453 Binary files /dev/null and b/assets/images/onboard_3.png differ diff --git a/lib/data/data.dart b/lib/data/data.dart new file mode 100644 index 0000000..660437f --- /dev/null +++ b/lib/data/data.dart @@ -0,0 +1,69 @@ +import 'package:flutter/material.dart'; + + +class SliderModel{ + + String imageAssetPath; + String title; + String desc; + + SliderModel({this.imageAssetPath,this.title,this.desc}); + + void setImageAssetPath(String getImageAssetPath){ + imageAssetPath = getImageAssetPath; + } + + void setTitle(String getTitle){ + title = getTitle; + } + + void setDesc(String getDesc){ + desc = getDesc; + } + + String getImageAssetPath(){ + return imageAssetPath; + } + + String getTitle(){ + return title; + } + + String getDesc(){ + return desc; + } + +} + + +List getSlides(){ + + List slides = new List(); + SliderModel sliderModel = new SliderModel(); + + //1 + sliderModel.setDesc("Digital transformation of maintaining the records of forest trees."); + sliderModel.setTitle("Tag Trees!"); + sliderModel.setImageAssetPath("assets/images/onboard_1.png"); + slides.add(sliderModel); + + sliderModel = new SliderModel(); + + //2 + sliderModel.setDesc("QR code generation for unique identification of every tree, prediction of different parameters and much more!"); + sliderModel.setTitle("Locate Trees!"); + sliderModel.setImageAssetPath("assets/images/onboard_2.png"); + slides.add(sliderModel); + + sliderModel = new SliderModel(); + + //3 + sliderModel.setDesc("Our app helps in analyzing the various aspects regarding trees! diversity, age, height, growth, and much more"); + sliderModel.setTitle("Save Trees!"); + sliderModel.setImageAssetPath("assets/images/onboard_3.png"); + slides.add(sliderModel); + + sliderModel = new SliderModel(); + + return slides; +} \ No newline at end of file diff --git a/lib/data/main.dart b/lib/data/main.dart new file mode 100644 index 0000000..d4b1bdf --- /dev/null +++ b/lib/data/main.dart @@ -0,0 +1,8 @@ +import 'package:flutter/material.dart'; + +class Main extends StatelessWidget { + @override + Widget build(BuildContext context) { + return Container(); + } +} diff --git a/lib/main.dart b/lib/main.dart index d6611a9..d20ff72 100644 --- a/lib/main.dart +++ b/lib/main.dart @@ -1,28 +1,195 @@ -import 'package:firebase_core/firebase_core.dart'; +import 'dart:io'; +import 'package:forest_tagger/components/WelComePage.dart'; +import 'package:forest_tagger/components/signUp.dart'; +import 'package:forest_tagger/data/data.dart'; import 'package:flutter/material.dart'; +import 'package:firebase_core/firebase_core.dart'; -import 'package:forest_tagger/components/AuthHandler.dart'; +void main() async { + WidgetsFlutterBinding.ensureInitialized(); + await Firebase.initializeApp(); + runApp(MyApp()); +} +class MyApp extends StatelessWidget { + @override + Widget build(BuildContext context) { + return MaterialApp( + home: Home(), + debugShowCheckedModeBanner: false, + ); + } +} + +class Home extends StatefulWidget { + @override + _HomeState createState() => _HomeState(); +} +class _HomeState extends State { -void main() async{ - WidgetsFlutterBinding.ensureInitialized(); - await Firebase.initializeApp(); - runApp(MyApp()); + // ignore: deprecated_member_use + List mySLides = new List(); + int slideIndex = 0; + PageController controller; + Widget _buildPageIndicator(bool isCurrentPage){ + return Container( + margin: EdgeInsets.symmetric(horizontal: 2.0), + height: isCurrentPage ? 10.0 : 6.0, + width: isCurrentPage ? 10.0 : 6.0, + decoration: BoxDecoration( + color: isCurrentPage ? Colors.brown : Colors.brown, + borderRadius: BorderRadius.circular(12), + ), + ); + } + + @override + void initState() { + // ignore: todo + // TODO: implement initState + super.initState(); + mySLides = getSlides(); + controller = new PageController(); + } + + @override + Widget build(BuildContext context) { + return Container( + decoration: BoxDecoration( + gradient: LinearGradient( + colors: [const Color(0xff3C8CE7), const Color(0xff00EAFF)])), + child: Scaffold( + backgroundColor: Colors.white, + body: Container( + height: MediaQuery.of(context).size.height - 100, + child: PageView( + controller: controller, + onPageChanged: (index) { + setState(() { + slideIndex = index; + }); + }, + children: [ + SlideTile( + imagePath: mySLides[0].getImageAssetPath(), + title: mySLides[0].getTitle(), + desc: mySLides[0].getDesc(), + ), + SlideTile( + imagePath: mySLides[1].getImageAssetPath(), + title: mySLides[1].getTitle(), + desc: mySLides[1].getDesc(), + ), + SlideTile( + imagePath: mySLides[2].getImageAssetPath(), + title: mySLides[2].getTitle(), + desc: mySLides[2].getDesc(), + ) + ], + ), + ), + bottomSheet: slideIndex != 2 ? Container( + margin: EdgeInsets.symmetric(vertical: 16), + child: Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + // ignore: deprecated_member_use + FlatButton( + onPressed: (){ + controller.animateToPage(2, duration: Duration(milliseconds: 400), curve: Curves.linear); + }, + splashColor: Colors.blue[50], + child: Text( + "SKIP", + style: TextStyle(color: Colors.greenAccent, fontWeight: FontWeight.w600, + background: Paint() + ..strokeWidth = 50.0 + ..color = Colors.brown + ..style = PaintingStyle.stroke + ..strokeJoin = StrokeJoin.round), + ), + ), + Container( + child: Row( + children: [ + for (int i = 0; i < 3 ; i++) i == slideIndex ? _buildPageIndicator(true): _buildPageIndicator(false), + ],), + ), + // ignore: deprecated_member_use + FlatButton( + onPressed: (){ + print("this is slideIndex: $slideIndex"); + controller.animateToPage(slideIndex + 1, duration: Duration(milliseconds: 500), curve: Curves.linear); + }, + splashColor: Colors.blue[50], + child: Text( + "NEXT", + style: TextStyle(color: Colors.greenAccent, fontWeight: FontWeight.w600, + background: Paint() + ..strokeWidth = 50.0 + ..color = Colors.brown + ..style = PaintingStyle.stroke + ..strokeJoin = StrokeJoin.round), + ), + ), + ], + ), + ): InkWell( + onTap: (){ + Navigator.push( + context, + MaterialPageRoute(builder: (context) => Welcome()), + ); + }, + child: Container( + + height: Platform.isIOS ? 70 : 60, + color: Colors.lightGreen, + alignment: Alignment.center, + child: Text( + "LETS GO!!", + style: TextStyle(color: Colors.brown, fontWeight: FontWeight.w900),), + + ), + ), + ), + ); + } } -class MyApp extends StatelessWidget { - // This widget is the root of your application. +// ignore: must_be_immutable +class SlideTile extends StatelessWidget { + String imagePath, title, desc; + + SlideTile({this.imagePath, this.title, this.desc}); + @override Widget build(BuildContext context) { - return MaterialApp( - debugShowCheckedModeBanner: false, - title: 'Flutter Demo', - theme: ThemeData( - primarySwatch: Colors.green, + return Container( + padding: EdgeInsets.symmetric(horizontal: 20), + alignment: Alignment.center, + child: Column( + mainAxisAlignment: MainAxisAlignment.center, + children: [ + Image.asset(imagePath), + SizedBox( + height: 40, + ), + Text(title, textAlign: TextAlign.center,style: TextStyle( + fontWeight: FontWeight.w500, + fontSize: 20 + ),), + SizedBox( + height: 20, + ), + Text(desc, textAlign: TextAlign.center,style: TextStyle( + fontWeight: FontWeight.w500, + fontSize: 14)) + ], ), - home: loggedInChecking(), ); } -} \ No newline at end of file +} + diff --git a/pubspec.lock b/pubspec.lock index 3a2712f..971621c 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -21,7 +21,7 @@ packages: name: async url: "https://pub.dartlang.org" source: hosted - version: "2.5.0-nullsafety.1" + version: "2.6.1" auth_buttons: dependency: "direct main" description: @@ -49,21 +49,21 @@ packages: name: boolean_selector url: "https://pub.dartlang.org" source: hosted - version: "2.1.0-nullsafety.1" + version: "2.1.0" characters: dependency: transitive description: name: characters url: "https://pub.dartlang.org" source: hosted - version: "1.1.0-nullsafety.3" + version: "1.1.0" charcode: dependency: transitive description: name: charcode url: "https://pub.dartlang.org" source: hosted - version: "1.2.0-nullsafety.1" + version: "1.2.0" clip_shadow: dependency: "direct main" description: @@ -77,35 +77,35 @@ packages: name: clock url: "https://pub.dartlang.org" source: hosted - version: "1.1.0-nullsafety.1" + version: "1.1.0" cloud_firestore: dependency: "direct main" description: name: cloud_firestore url: "https://pub.dartlang.org" source: hosted - version: "0.16.0+1" + version: "0.14.4" cloud_firestore_platform_interface: dependency: transitive description: name: cloud_firestore_platform_interface url: "https://pub.dartlang.org" source: hosted - version: "3.0.2" + version: "2.2.1" cloud_firestore_web: dependency: transitive description: name: cloud_firestore_web url: "https://pub.dartlang.org" source: hosted - version: "0.3.0+2" + version: "0.2.1+2" collection: dependency: transitive description: name: collection url: "https://pub.dartlang.org" source: hosted - version: "1.15.0-nullsafety.3" + version: "1.15.0" convert: dependency: transitive description: @@ -140,7 +140,7 @@ packages: name: fake_async url: "https://pub.dartlang.org" source: hosted - version: "1.2.0-nullsafety.1" + version: "1.2.0" ffi: dependency: transitive description: @@ -168,7 +168,7 @@ packages: name: firebase_analytics url: "https://pub.dartlang.org" source: hosted - version: "7.0.1" + version: "6.3.0" firebase_analytics_platform_interface: dependency: transitive description: @@ -189,68 +189,75 @@ packages: name: firebase_auth url: "https://pub.dartlang.org" source: hosted - version: "0.20.1" + version: "0.18.4+1" firebase_auth_platform_interface: dependency: transitive description: name: firebase_auth_platform_interface url: "https://pub.dartlang.org" source: hosted - version: "3.1.0" + version: "2.1.4" firebase_auth_web: dependency: transitive description: name: firebase_auth_web url: "https://pub.dartlang.org" source: hosted - version: "0.3.3" + version: "0.3.2+3" firebase_core: dependency: "direct main" description: name: firebase_core url: "https://pub.dartlang.org" source: hosted - version: "0.7.0" + version: "0.5.3" firebase_core_platform_interface: dependency: transitive description: name: firebase_core_platform_interface url: "https://pub.dartlang.org" source: hosted - version: "3.0.1" + version: "2.1.0" firebase_core_web: dependency: transitive description: name: firebase_core_web url: "https://pub.dartlang.org" source: hosted - version: "0.2.1+3" + version: "0.2.1+1" firebase_storage: dependency: "direct main" description: name: firebase_storage url: "https://pub.dartlang.org" source: hosted - version: "7.0.0" + version: "5.2.0" firebase_storage_platform_interface: dependency: transitive description: name: firebase_storage_platform_interface url: "https://pub.dartlang.org" source: hosted - version: "1.0.4" + version: "1.0.2" firebase_storage_web: dependency: transitive description: name: firebase_storage_web url: "https://pub.dartlang.org" source: hosted - version: "0.1.1+3" + version: "0.1.1+1" flutter: dependency: "direct main" description: flutter source: sdk version: "0.0.0" + flutter_launcher_icons: + dependency: "direct main" + description: + name: flutter_launcher_icons + url: "https://pub.dartlang.org" + source: hosted + version: "0.7.5" flutter_plugin_android_lifecycle: dependency: transitive description: @@ -311,7 +318,7 @@ packages: source: hosted version: "0.9.2" http: - dependency: "direct main" + dependency: transitive description: name: http url: "https://pub.dartlang.org" @@ -358,7 +365,7 @@ packages: name: js url: "https://pub.dartlang.org" source: hosted - version: "0.6.2" + version: "0.6.3" mapbox_gl: dependency: "direct main" description: @@ -393,14 +400,14 @@ packages: name: matcher url: "https://pub.dartlang.org" source: hosted - version: "0.12.10-nullsafety.1" + version: "0.12.10" meta: dependency: transitive description: name: meta url: "https://pub.dartlang.org" source: hosted - version: "1.3.0-nullsafety.3" + version: "1.3.0" modal_progress_hud: dependency: "direct main" description: @@ -414,7 +421,7 @@ packages: name: path url: "https://pub.dartlang.org" source: hosted - version: "1.8.0-nullsafety.1" + version: "1.8.0" path_parsing: dependency: transitive description: @@ -559,7 +566,7 @@ packages: name: source_span url: "https://pub.dartlang.org" source: hosted - version: "1.8.0-nullsafety.2" + version: "1.8.1" sqflite: dependency: "direct main" description: @@ -580,21 +587,21 @@ packages: name: stack_trace url: "https://pub.dartlang.org" source: hosted - version: "1.10.0-nullsafety.1" + version: "1.10.0" stream_channel: dependency: transitive description: name: stream_channel url: "https://pub.dartlang.org" source: hosted - version: "2.1.0-nullsafety.1" + version: "2.1.0" string_scanner: dependency: transitive description: name: string_scanner url: "https://pub.dartlang.org" source: hosted - version: "1.1.0-nullsafety.1" + version: "1.1.0" synchronized: dependency: transitive description: @@ -608,14 +615,14 @@ packages: name: term_glyph url: "https://pub.dartlang.org" source: hosted - version: "1.2.0-nullsafety.1" + version: "1.2.0" test_api: dependency: transitive description: name: test_api url: "https://pub.dartlang.org" source: hosted - version: "0.2.19-nullsafety.2" + version: "0.3.0" toast: dependency: "direct main" description: @@ -629,7 +636,7 @@ packages: name: typed_data url: "https://pub.dartlang.org" source: hosted - version: "1.3.0-nullsafety.3" + version: "1.3.0" uuid: dependency: "direct main" description: @@ -643,7 +650,7 @@ packages: name: vector_math url: "https://pub.dartlang.org" source: hosted - version: "2.1.0-nullsafety.3" + version: "2.1.0" win32: dependency: transitive description: @@ -665,6 +672,13 @@ packages: url: "https://pub.dartlang.org" source: hosted version: "4.5.1" + yaml: + dependency: transitive + description: + name: yaml + url: "https://pub.dartlang.org" + source: hosted + version: "2.2.1" sdks: - dart: ">=2.10.2 <2.11.0" - flutter: ">=1.22.2 <2.0.0" + dart: ">=2.12.0 <3.0.0" + flutter: ">=1.22.2" diff --git a/pubspec.yaml b/pubspec.yaml index e9e0504..9eb449f 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -26,6 +26,7 @@ dependencies: # The following adds the Cupertino Icons font to your application. # Use with the CupertinoIcons class for iOS style icons. + firebase_core : ^0.5.0 cupertino_icons: ^1.0.0 barcode_scan: ^2.0.1 pretty_qr_code: ^1.0.1 @@ -35,7 +36,6 @@ dependencies: firebase_analytics: cloud_firestore: firebase_auth: - firebase_core: screenshot: ^0.3.0 permission_handler: ^5.1.0+2 pdf: ^2.1.0 @@ -77,6 +77,10 @@ flutter: - assets/images/palm-tree-outline.png - assets/images/upload.png - assets/images/loading.gif + - assets/images/onboard_1.png + - assets/images/onboard_2.png + - assets/images/onboard_3.png + # An image asset can refer to one or more resolution-specific "variants", see # https://flutter.dev/assets-and-images/#resolution-aware.