diff --git a/src/assets/logo.png b/src/assets/logo.png new file mode 100644 index 0000000..23cc3a1 Binary files /dev/null and b/src/assets/logo.png differ diff --git a/src/fonts/BungeeShade-Regular.ttf b/src/fonts/BungeeShade-Regular.ttf new file mode 100644 index 0000000..c83e601 Binary files /dev/null and b/src/fonts/BungeeShade-Regular.ttf differ diff --git a/src/fonts/Exo2-Italic.ttf b/src/fonts/Exo2-Italic.ttf new file mode 100644 index 0000000..eeb9a0f Binary files /dev/null and b/src/fonts/Exo2-Italic.ttf differ diff --git a/src/fonts/Exo2-Regular.ttf b/src/fonts/Exo2-Regular.ttf new file mode 100644 index 0000000..1ef4878 Binary files /dev/null and b/src/fonts/Exo2-Regular.ttf differ diff --git a/src/fonts/KaushanScript-Regular.ttf b/src/fonts/KaushanScript-Regular.ttf new file mode 100644 index 0000000..522dc72 Binary files /dev/null and b/src/fonts/KaushanScript-Regular.ttf differ diff --git a/src/fonts/PermanentMarker-Regular.ttf b/src/fonts/PermanentMarker-Regular.ttf new file mode 100644 index 0000000..6541e9d Binary files /dev/null and b/src/fonts/PermanentMarker-Regular.ttf differ diff --git a/src/lib/landing_page.dart b/src/lib/landing_page.dart new file mode 100644 index 0000000..5aca7d9 --- /dev/null +++ b/src/lib/landing_page.dart @@ -0,0 +1,13 @@ +import 'package:flutter/material.dart'; + +class LandingPage extends StatefulWidget { + @override + _LandingPageState createState() => _LandingPageState(); +} + +class _LandingPageState extends State { + @override + Widget build(BuildContext context) { + return Container(); + } +} diff --git a/src/lib/main.dart b/src/lib/main.dart index 11655b6..eb03676 100644 --- a/src/lib/main.dart +++ b/src/lib/main.dart @@ -1,6 +1,9 @@ import 'package:flutter/material.dart'; +import 'package:flutter/services.dart'; +import 'package:flutter-kickstart/splash_screen.dart'; void main() { + WidgetsFlutterBinding.ensureInitialized(); runApp(MyApp()); } @@ -8,110 +11,14 @@ class MyApp extends StatelessWidget { // This widget is the root of your application. @override Widget build(BuildContext context) { + SystemChrome.setPreferredOrientations([ + DeviceOrientation.portraitUp, + DeviceOrientation.portraitDown, + ]); return MaterialApp( title: 'Flutter Demo', - theme: ThemeData( - // This is the theme of your application. - // - // Try running your application with "flutter run". You'll see the - // application has a blue toolbar. Then, without quitting the app, try - // changing the primarySwatch below to Colors.green and then invoke - // "hot reload" (press "r" in the console where you ran "flutter run", - // or simply save your changes to "hot reload" in a Flutter IDE). - // Notice that the counter didn't reset back to zero; the application - // is not restarted. - primarySwatch: Colors.blue, - // This makes the visual density adapt to the platform that you run - // the app on. For desktop platforms, the controls will be smaller and - // closer together (more dense) than on mobile platforms. - visualDensity: VisualDensity.adaptivePlatformDensity, - ), - home: MyHomePage(title: 'Flutter Demo Home Page'), - ); - } -} - -class MyHomePage extends StatefulWidget { - MyHomePage({Key key, this.title}) : super(key: key); - - // This widget is the home page of your application. It is stateful, meaning - // that it has a State object (defined below) that contains fields that affect - // how it looks. - - // This class is the configuration for the state. It holds the values (in this - // case the title) provided by the parent (in this case the App widget) and - // used by the build method of the State. Fields in a Widget subclass are - // always marked "final". - - final String title; - - @override - _MyHomePageState createState() => _MyHomePageState(); -} - -class _MyHomePageState extends State { - int _counter = 0; - - void _incrementCounter() { - setState(() { - // This call to setState tells the Flutter framework that something has - // changed in this State, which causes it to rerun the build method below - // so that the display can reflect the updated values. If we changed - // _counter without calling setState(), then the build method would not be - // called again, and so nothing would appear to happen. - _counter++; - }); - } - - @override - Widget build(BuildContext context) { - // This method is rerun every time setState is called, for instance as done - // by the _incrementCounter method above. - // - // The Flutter framework has been optimized to make rerunning build methods - // fast, so that you can just rebuild anything that needs updating rather - // than having to individually change instances of widgets. - return Scaffold( - appBar: AppBar( - // Here we take the value from the MyHomePage object that was created by - // the App.build method, and use it to set our appbar title. - title: Text(widget.title), - ), - body: Center( - // Center is a layout widget. It takes a single child and positions it - // in the middle of the parent. - child: Column( - // Column is also a layout widget. It takes a list of children and - // arranges them vertically. By default, it sizes itself to fit its - // children horizontally, and tries to be as tall as its parent. - // - // Invoke "debug painting" (press "p" in the console, choose the - // "Toggle Debug Paint" action from the Flutter Inspector in Android - // Studio, or the "Toggle Debug Paint" command in Visual Studio Code) - // to see the wireframe for each widget. - // - // Column has various properties to control how it sizes itself and - // how it positions its children. Here we use mainAxisAlignment to - // center the children vertically; the main axis here is the vertical - // axis because Columns are vertical (the cross axis would be - // horizontal). - mainAxisAlignment: MainAxisAlignment.center, - children: [ - Text( - 'You have pushed the button this many times:', - ), - Text( - '$_counter', - style: Theme.of(context).textTheme.headline4, - ), - ], - ), - ), - floatingActionButton: FloatingActionButton( - onPressed: _incrementCounter, - tooltip: 'Increment', - child: Icon(Icons.add), - ), // This trailing comma makes auto-formatting nicer for build methods. + home: SplashScreen(), + debugShowCheckedModeBanner: false, ); } } diff --git a/src/lib/splash_screen.dart b/src/lib/splash_screen.dart new file mode 100644 index 0000000..1d37c10 --- /dev/null +++ b/src/lib/splash_screen.dart @@ -0,0 +1,73 @@ +import 'dart:async'; +import 'package:flutter/material.dart'; +import 'package:animated_text_kit/animated_text_kit.dart'; +import 'package:flutter-kickstart/landing_page.dart'; + +class SplashScreen extends StatefulWidget { + @override + _SplashScreenState createState() => _SplashScreenState(); +} + +class _SplashScreenState extends State { + startTime() async { + var _duration = new Duration(seconds: 5); + return new Timer(_duration, navigationPage); + } + + void navigationPage() { + Navigator.of(context) + .push(MaterialPageRoute(builder: (context) => LandingPage())); + } + + @override + void initState() { + // TODO: implement initState + super.initState(); + startTime(); + } + + @override + Widget build(BuildContext context) { + return Scaffold( + body: Container( + color: Colors.deepOrange, + child: Column( + mainAxisAlignment: MainAxisAlignment.center, + children: [ + Image( + image: AssetImage("assets/logo.png"), + ), + Row( + mainAxisAlignment: MainAxisAlignment.center, + children: [ + // SizedBox(width: 20.0, height: 1.0), + Text( + "Be", + style: TextStyle( + fontSize: 40.0, + color: Colors.white, + fontWeight: FontWeight.bold, + fontFamily: "PermanentMarker"), + ), + SizedBox(width: 10.0), + RotateAnimatedTextKit( + onTap: () { + print("Tap Event"); + }, + text: ["ATTRACTIVE", "INOVATIVE", "DIFFERENT"], + textStyle: TextStyle( + fontSize: 35.0, + fontFamily: "BungeeShade", + color: Colors.white), + textAlign: TextAlign.start, + alignment: + AlignmentDirectional.topStart // or Alignment.topLeft + ), + ], + ) + ], + ), + ), + ); + } +} diff --git a/src/pubspec.lock b/src/pubspec.lock index f628010..f5481d8 100644 --- a/src/pubspec.lock +++ b/src/pubspec.lock @@ -1,48 +1,55 @@ # Generated by pub # See https://dart.dev/tools/pub/glossary#lockfile packages: + animated_text_kit: + dependency: "direct main" + description: + name: animated_text_kit + url: "https://pub.dartlang.org" + source: hosted + version: "1.3.1" async: dependency: transitive description: name: async url: "https://pub.dartlang.org" source: hosted - version: "2.5.0-nullsafety.1" + version: "2.4.2" boolean_selector: dependency: transitive description: name: boolean_selector url: "https://pub.dartlang.org" source: hosted - version: "2.1.0-nullsafety.1" + version: "2.0.0" characters: dependency: transitive description: name: characters url: "https://pub.dartlang.org" source: hosted - version: "1.1.0-nullsafety.3" + version: "1.0.0" charcode: dependency: transitive description: name: charcode url: "https://pub.dartlang.org" source: hosted - version: "1.2.0-nullsafety.1" + version: "1.1.3" clock: dependency: transitive description: name: clock url: "https://pub.dartlang.org" source: hosted - version: "1.1.0-nullsafety.1" + version: "1.0.1" collection: dependency: transitive description: name: collection url: "https://pub.dartlang.org" source: hosted - version: "1.15.0-nullsafety.3" + version: "1.14.13" cupertino_icons: dependency: "direct main" description: @@ -56,7 +63,7 @@ packages: name: fake_async url: "https://pub.dartlang.org" source: hosted - version: "1.2.0-nullsafety.1" + version: "1.1.0" flutter: dependency: "direct main" description: flutter @@ -73,21 +80,21 @@ packages: name: matcher url: "https://pub.dartlang.org" source: hosted - version: "0.12.10-nullsafety.1" + version: "0.12.8" meta: dependency: transitive description: name: meta url: "https://pub.dartlang.org" source: hosted - version: "1.3.0-nullsafety.3" + version: "1.1.8" path: dependency: transitive description: name: path url: "https://pub.dartlang.org" source: hosted - version: "1.8.0-nullsafety.1" + version: "1.7.0" sky_engine: dependency: transitive description: flutter @@ -99,55 +106,56 @@ packages: name: source_span url: "https://pub.dartlang.org" source: hosted - version: "1.8.0-nullsafety.2" + version: "1.7.0" stack_trace: dependency: transitive description: name: stack_trace url: "https://pub.dartlang.org" source: hosted - version: "1.10.0-nullsafety.1" + version: "1.9.5" stream_channel: dependency: transitive description: name: stream_channel url: "https://pub.dartlang.org" source: hosted - version: "2.1.0-nullsafety.1" + version: "2.0.0" string_scanner: dependency: transitive description: name: string_scanner url: "https://pub.dartlang.org" source: hosted - version: "1.1.0-nullsafety.1" + version: "1.0.5" term_glyph: dependency: transitive description: name: term_glyph url: "https://pub.dartlang.org" source: hosted - version: "1.2.0-nullsafety.1" + version: "1.1.0" test_api: dependency: transitive description: name: test_api url: "https://pub.dartlang.org" source: hosted - version: "0.2.19-nullsafety.2" + version: "0.2.17" typed_data: dependency: transitive description: name: typed_data url: "https://pub.dartlang.org" source: hosted - version: "1.3.0-nullsafety.3" + version: "1.2.0" vector_math: dependency: transitive description: name: vector_math url: "https://pub.dartlang.org" source: hosted - version: "2.1.0-nullsafety.3" + version: "2.0.8" sdks: - dart: ">=2.10.0-110 <2.11.0" + dart: ">=2.9.0-14.0.dev <3.0.0" + flutter: ">=0.3.0 <2.0.0" diff --git a/src/pubspec.yaml b/src/pubspec.yaml index 44032d3..d538a07 100644 --- a/src/pubspec.yaml +++ b/src/pubspec.yaml @@ -28,6 +28,7 @@ dependencies: # The following adds the Cupertino Icons font to your application. # Use with the CupertinoIcons class for iOS style icons. cupertino_icons: ^1.0.0 + animated_text_kit: ^1.3.1 dev_dependencies: flutter_test: @@ -45,9 +46,8 @@ flutter: uses-material-design: true # To add assets to your application, add an assets section, like this: - # assets: - # - images/a_dot_burr.jpeg - # - images/a_dot_ham.jpeg + assets: + - assets/logo.png # An image asset can refer to one or more resolution-specific "variants", see # https://flutter.dev/assets-and-images/#resolution-aware. @@ -60,17 +60,22 @@ flutter: # "family" key with the font family name, and a "fonts" key with a # list giving the asset and other descriptors for the font. For # example: - # fonts: - # - family: Schyler - # fonts: - # - asset: fonts/Schyler-Regular.ttf + fonts: + - family: BungeeShade + fonts: + - asset: fonts/BungeeShade-Regular.ttf # - asset: fonts/Schyler-Italic.ttf # style: italic - # - family: Trajan Pro - # fonts: - # - asset: fonts/TrajanPro.ttf - # - asset: fonts/TrajanPro_Bold.ttf - # weight: 700 + + - family: Exo2 + fonts: + - asset: fonts/Exo2-Regular.ttf + - asset: fonts/Exo2-Italic.ttf + style: italic + + - family: PermanentMarker + fonts: + - asset: fonts/PermanentMarker-Regular.ttfts/TrajanPro_Bold.ttf # # For details regarding fonts from package dependencies, # see https://flutter.dev/custom-fonts/#from-packages