├── android ├── gradle.properties ├── local.properties ├── settings.gradle ├── build.gradle ├── kubico_android.iml ├── gradlew.bat └── gradlew ├── assets └── hotel-voramar-sosua.jpg ├── lib ├── global │ └── const-global.dart ├── main.dart ├── pages │ ├── home.dart │ ├── splash.dart │ └── login.dart ├── tabs │ └── carousel-tab.dart └── widgets │ ├── login.dart │ ├── drawer.dart │ ├── register-form.dart │ ├── tela_vertical.dart │ └── tela_horizontal.dart ├── README.md ├── kubico.iml ├── LICENSE.md ├── pubspec.yaml └── pubspec.lock /android/gradle.properties: -------------------------------------------------------------------------------- 1 | org.gradle.jvmargs=-Xmx1536M 2 | 3 | -------------------------------------------------------------------------------- /assets/hotel-voramar-sosua.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DVS2000/Kubico/HEAD/assets/hotel-voramar-sosua.jpg -------------------------------------------------------------------------------- /lib/global/const-global.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | 4 | final colorPrimary = Color(0xff7AAB99); -------------------------------------------------------------------------------- /android/local.properties: -------------------------------------------------------------------------------- 1 | sdk.dir=C:\\Android\\Sdk\\ 2 | flutter.sdk=C:\\flutter 3 | flutter.buildMode=debug 4 | flutter.versionName=1.0.0 5 | flutter.versionCode=1 -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | /* KUBICO */ 2 | 3 | A new Flutter project. 4 | 5 | ![Screenshot_20190827-093514](https://user-images.githubusercontent.com/47059370/63761513-35491e00-c8b9-11e9-88fa-436c2621b584.jpg) 6 | ![Screenshot_20190827-093520](https://user-images.githubusercontent.com/47059370/63761515-35491e00-c8b9-11e9-9cf4-6e7ab9aeb803.jpg) 7 | ![Screenshot_20190827-093525](https://user-images.githubusercontent.com/47059370/63761516-35e1b480-c8b9-11e9-8a78-ce8b1e84579e.jpg) 8 | -------------------------------------------------------------------------------- /lib/main.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:kubico/src/pages/login.dart'; 3 | import 'package:kubico/src/pages/splash.dart'; 4 | 5 | void main() => runApp(MyApp()); 6 | 7 | class MyApp extends StatelessWidget { 8 | @override 9 | Widget build(BuildContext context) { 10 | return MaterialApp( 11 | debugShowCheckedModeBanner: false, 12 | theme: ThemeData( 13 | primarySwatch: Colors.green 14 | ), 15 | home: Splash(), 16 | ); 17 | } 18 | } 19 | 20 | 21 | -------------------------------------------------------------------------------- /android/settings.gradle: -------------------------------------------------------------------------------- 1 | include ':app' 2 | 3 | def flutterProjectRoot = rootProject.projectDir.parentFile.toPath() 4 | 5 | def plugins = new Properties() 6 | def pluginsFile = new File(flutterProjectRoot.toFile(), '.flutter-plugins') 7 | if (pluginsFile.exists()) { 8 | pluginsFile.withReader('UTF-8') { reader -> plugins.load(reader) } 9 | } 10 | 11 | plugins.each { name, path -> 12 | def pluginDirectory = flutterProjectRoot.resolve(path).resolve('android').toFile() 13 | include ":$name" 14 | project(":$name").projectDir = pluginDirectory 15 | } 16 | -------------------------------------------------------------------------------- /android/build.gradle: -------------------------------------------------------------------------------- 1 | buildscript { 2 | repositories { 3 | google() 4 | jcenter() 5 | } 6 | 7 | dependencies { 8 | classpath 'com.android.tools.build:gradle:3.2.1' 9 | } 10 | } 11 | 12 | allprojects { 13 | repositories { 14 | google() 15 | jcenter() 16 | } 17 | } 18 | 19 | rootProject.buildDir = '../build' 20 | subprojects { 21 | project.buildDir = "${rootProject.buildDir}/${project.name}" 22 | } 23 | subprojects { 24 | project.evaluationDependsOn(':app') 25 | } 26 | 27 | task clean(type: Delete) { 28 | delete rootProject.buildDir 29 | } 30 | -------------------------------------------------------------------------------- /kubico.iml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /lib/pages/home.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:font_awesome_flutter/font_awesome_flutter.dart'; 3 | import 'package:kubico/src/widgets/drawer.dart'; 4 | 5 | 6 | class Home extends StatefulWidget { 7 | @override 8 | _HomeState createState() => _HomeState(); 9 | } 10 | 11 | class _HomeState extends State { 12 | 13 | final _stateKey = GlobalKey(); 14 | @override 15 | Widget build(BuildContext context) { 16 | return Scaffold( 17 | key: _stateKey, 18 | backgroundColor: Colors.white, 19 | appBar: AppBar( 20 | backgroundColor: Colors.white, 21 | elevation: 0, 22 | leading: IconButton( 23 | onPressed: () => _stateKey.currentState.openDrawer(), 24 | icon: Icon( 25 | FontAwesomeIcons.alignLeft, 26 | color: Colors.green, 27 | ), 28 | ), 29 | ), 30 | drawer: DrawerWidget(), 31 | ); 32 | } 33 | } -------------------------------------------------------------------------------- /android/kubico_android.iml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /LICENSE.md: -------------------------------------------------------------------------------- 1 | Copyright (c) <2019>, 2 | All rights reserved. 3 | 4 | Redistribution and use in source and binary forms, with or without 5 | modification, are permitted provided that the following conditions are met: 6 | 7 | 1. Redistributions of source code must retain the above copyright notice, this 8 | list of conditions and the following disclaimer. 9 | 2. Redistributions in binary form must reproduce the above copyright notice, 10 | this list of conditions and the following disclaimer in the documentation 11 | and/or other materials provided with the distribution. 12 | 13 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 14 | ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 15 | WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 16 | DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR 17 | ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 18 | (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 19 | LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 20 | ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 21 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 22 | SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 23 | 24 | The views and conclusions contained in the software and documentation are those 25 | of the authors and should not be interpreted as representing official policies, 26 | either expressed or implied, of the project. -------------------------------------------------------------------------------- /lib/pages/splash.dart: -------------------------------------------------------------------------------- 1 | import 'dart:async'; 2 | import 'package:flutter/material.dart'; 3 | import 'package:kubico/src/pages/login.dart'; 4 | import 'package:kubico/src/tabs/carousel-tab.dart'; 5 | import 'package:font_awesome_flutter/font_awesome_flutter.dart'; 6 | import 'package:kubico/src/widgets/tela_horizontal.dart'; 7 | import 'package:kubico/src/widgets/tela_vertical.dart'; 8 | 9 | class Splash extends StatefulWidget { 10 | @override 11 | _SplashState createState() => _SplashState(); 12 | } 13 | 14 | class _SplashState extends State with SingleTickerProviderStateMixin { 15 | TabController _tabController; 16 | Timer _timer; 17 | 18 | @override 19 | void initState() { 20 | _tabController = TabController(vsync: this, length: 3); 21 | _timer = Timer.periodic(Duration(seconds: 2), (timer) { 22 | setState(() { 23 | if (_tabController.index == 2) { 24 | _tabController.animateTo(0); 25 | } else { 26 | _tabController.animateTo(_tabController.index + 1); 27 | } 28 | print("Dorivaldo"); 29 | }); 30 | }); 31 | _tabController.addListener(() => teste()); 32 | super.initState(); 33 | } 34 | 35 | void teste() { 36 | setState(() {}); 37 | } 38 | 39 | @override 40 | void dispose() { 41 | _timer.cancel(); 42 | super.dispose(); 43 | } 44 | 45 | 46 | 47 | 48 | @override 49 | Widget build(BuildContext context) { 50 | final size = MediaQuery.of(context).size; 51 | return MediaQuery.of(context).orientation == Orientation.portrait ? TelaVertical(_tabController) : TelaHorizontal(_tabController); 52 | 53 | } 54 | } 55 | -------------------------------------------------------------------------------- /lib/tabs/carousel-tab.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | class CarouselTab extends StatelessWidget { 4 | final String img; 5 | CarouselTab(this.img); 6 | 7 | @override 8 | Widget build(BuildContext context) { 9 | 10 | return Stack( 11 | children: [ 12 | Image.asset(img ?? 'assets/imgs/pexels-photo-2631746.jpg', 13 | fit: BoxFit.cover, 14 | height: double.infinity, 15 | width: double.infinity,), 16 | Container( 17 | 18 | decoration: BoxDecoration( 19 | gradient: LinearGradient(colors: [ 20 | Colors.black.withOpacity(.35), 21 | Colors.black.withOpacity(.75), 22 | ], begin: Alignment.topCenter, end: Alignment.bottomCenter)), 23 | child: Stack( 24 | children: [ 25 | Positioned( 26 | bottom: 50, 27 | right: 10, 28 | left: 10, 29 | child: Container( 30 | 31 | padding: const EdgeInsets.all(10.0), 32 | child: Text( 33 | "\"Dorivaldo dos Santos, programador junior na empresa Digital Factory, lá é fixe calmo e relaxante\"", 34 | style: TextStyle( 35 | color: Colors.white, 36 | fontSize: 15.0, 37 | fontWeight: FontWeight.w300 38 | ), 39 | ), 40 | ), 41 | ), 42 | Positioned( 43 | top: 20.0, 44 | left: 0, 45 | right: 0, 46 | child: Column( 47 | children: [ 48 | Text( 49 | "COFFEE BEANS", 50 | style: TextStyle( 51 | color: Colors.white, 52 | fontSize: 30, 53 | fontWeight: FontWeight.bold 54 | ), 55 | ), 56 | Text( 57 | "MONTHLY SUBSCRIPTION", 58 | style: TextStyle( 59 | color: Colors.white, 60 | fontSize: 20, 61 | fontWeight: FontWeight.w300 62 | ), 63 | ), 64 | ], 65 | ), 66 | ) 67 | ], 68 | ) 69 | ) 70 | ], 71 | ); 72 | } 73 | } 74 | -------------------------------------------------------------------------------- /lib/widgets/login.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | class LoginForm extends StatefulWidget { 4 | @override 5 | _LoginFormState createState() => _LoginFormState(); 6 | } 7 | 8 | class _LoginFormState extends State { 9 | @override 10 | Widget build(BuildContext context) { 11 | return Container( 12 | margin: EdgeInsets.symmetric(horizontal: 20), 13 | 14 | child: Center( 15 | child: Column( 16 | mainAxisAlignment: MainAxisAlignment.center, 17 | crossAxisAlignment: CrossAxisAlignment.center, 18 | children: [ 19 | Row( 20 | children: [ 21 | Icon( 22 | Icons.phone_android, 23 | color: Colors.grey, 24 | ), 25 | SizedBox(width: 20,), 26 | Expanded( 27 | child: TextField( 28 | style: TextStyle( 29 | fontWeight: FontWeight.w300 30 | ), 31 | decoration: InputDecoration( 32 | hintText: 'Correio electronico' 33 | ), 34 | ), 35 | ) 36 | ], 37 | ), 38 | SizedBox(height: 40,), 39 | Row( 40 | children: [ 41 | Icon( 42 | Icons.lock_open, 43 | color: Colors.grey, 44 | ), 45 | SizedBox(width: 20,), 46 | Expanded( 47 | child: TextField( 48 | style: TextStyle( 49 | fontWeight: FontWeight.w300 50 | ), 51 | decoration: InputDecoration( 52 | hintText: 'Palavra-passe' 53 | ), 54 | ), 55 | ) 56 | ], 57 | ), 58 | SizedBox(height: 50,), 59 | Text( 60 | "ESQUECEU A SENHA ?", 61 | style: TextStyle( 62 | fontWeight: FontWeight.w300 63 | ), 64 | ) 65 | ], 66 | ) 67 | ) 68 | ); 69 | } 70 | } -------------------------------------------------------------------------------- /android/gradlew.bat: -------------------------------------------------------------------------------- 1 | @if "%DEBUG%" == "" @echo off 2 | @rem ########################################################################## 3 | @rem 4 | @rem Gradle startup script for Windows 5 | @rem 6 | @rem ########################################################################## 7 | 8 | @rem Set local scope for the variables with windows NT shell 9 | if "%OS%"=="Windows_NT" setlocal 10 | 11 | @rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. 12 | set DEFAULT_JVM_OPTS= 13 | 14 | set DIRNAME=%~dp0 15 | if "%DIRNAME%" == "" set DIRNAME=. 16 | set APP_BASE_NAME=%~n0 17 | set APP_HOME=%DIRNAME% 18 | 19 | @rem Find java.exe 20 | if defined JAVA_HOME goto findJavaFromJavaHome 21 | 22 | set JAVA_EXE=java.exe 23 | %JAVA_EXE% -version >NUL 2>&1 24 | if "%ERRORLEVEL%" == "0" goto init 25 | 26 | echo. 27 | echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 28 | echo. 29 | echo Please set the JAVA_HOME variable in your environment to match the 30 | echo location of your Java installation. 31 | 32 | goto fail 33 | 34 | :findJavaFromJavaHome 35 | set JAVA_HOME=%JAVA_HOME:"=% 36 | set JAVA_EXE=%JAVA_HOME%/bin/java.exe 37 | 38 | if exist "%JAVA_EXE%" goto init 39 | 40 | echo. 41 | echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 42 | echo. 43 | echo Please set the JAVA_HOME variable in your environment to match the 44 | echo location of your Java installation. 45 | 46 | goto fail 47 | 48 | :init 49 | @rem Get command-line arguments, handling Windowz variants 50 | 51 | if not "%OS%" == "Windows_NT" goto win9xME_args 52 | if "%@eval[2+2]" == "4" goto 4NT_args 53 | 54 | :win9xME_args 55 | @rem Slurp the command line arguments. 56 | set CMD_LINE_ARGS= 57 | set _SKIP=2 58 | 59 | :win9xME_args_slurp 60 | if "x%~1" == "x" goto execute 61 | 62 | set CMD_LINE_ARGS=%* 63 | goto execute 64 | 65 | :4NT_args 66 | @rem Get arguments from the 4NT Shell from JP Software 67 | set CMD_LINE_ARGS=%$ 68 | 69 | :execute 70 | @rem Setup the command line 71 | 72 | set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar 73 | 74 | @rem Execute Gradle 75 | "%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS% 76 | 77 | :end 78 | @rem End local scope for the variables with windows NT shell 79 | if "%ERRORLEVEL%"=="0" goto mainEnd 80 | 81 | :fail 82 | rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of 83 | rem the _cmd.exe /c_ return code! 84 | if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1 85 | exit /b 1 86 | 87 | :mainEnd 88 | if "%OS%"=="Windows_NT" endlocal 89 | 90 | :omega 91 | -------------------------------------------------------------------------------- /pubspec.yaml: -------------------------------------------------------------------------------- 1 | name: kubico 2 | description: A new Flutter project. 3 | 4 | # The following defines the version and build number for your application. 5 | # A version number is three numbers separated by dots, like 1.2.43 6 | # followed by an optional build number separated by a +. 7 | # Both the version and the builder number may be overridden in flutter 8 | # build by specifying --build-name and --build-number, respectively. 9 | # In Android, build-name is used as versionName while build-number used as versionCode. 10 | # Read more about Android versioning at https://developer.android.com/studio/publish/versioning 11 | # In iOS, build-name is used as CFBundleShortVersionString while build-number used as CFBundleVersion. 12 | # Read more about iOS versioning at 13 | # https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html 14 | version: 1.0.0+1 15 | 16 | environment: 17 | sdk: ">=2.1.0 <3.0.0" 18 | 19 | dependencies: 20 | flutter: 21 | sdk: flutter 22 | 23 | # The following adds the Cupertino Icons font to your application. 24 | # Use with the CupertinoIcons class for iOS style icons. 25 | cupertino_icons: ^0.1.2 26 | font_awesome_flutter: ^8.5.0 27 | 28 | dev_dependencies: 29 | flutter_test: 30 | sdk: flutter 31 | 32 | 33 | # For information on the generic Dart part of this file, see the 34 | # following page: https://dart.dev/tools/pub/pubspec 35 | 36 | # The following section is specific to Flutter. 37 | flutter: 38 | 39 | # The following line ensures that the Material Icons font is 40 | # included with your application, so that you can use the icons in 41 | # the material Icons class. 42 | uses-material-design: true 43 | 44 | # To add assets to your application, add an assets section, like this: 45 | assets: 46 | - assets/ 47 | - assets/imgs/ 48 | # - images/a_dot_ham.jpeg 49 | 50 | # An image asset can refer to one or more resolution-specific "variants", see 51 | # https://flutter.dev/assets-and-images/#resolution-aware. 52 | 53 | # For details regarding adding assets from package dependencies, see 54 | # https://flutter.dev/assets-and-images/#from-packages 55 | 56 | # To add custom fonts to your application, add a fonts section here, 57 | # in this "flutter" section. Each entry in this list should have a 58 | # "family" key with the font family name, and a "fonts" key with a 59 | # list giving the asset and other descriptors for the font. For 60 | # example: 61 | # fonts: 62 | # - family: Schyler 63 | # fonts: 64 | # - asset: fonts/Schyler-Regular.ttf 65 | # - asset: fonts/Schyler-Italic.ttf 66 | # style: italic 67 | # - family: Trajan Pro 68 | # fonts: 69 | # - asset: fonts/TrajanPro.ttf 70 | # - asset: fonts/TrajanPro_Bold.ttf 71 | # weight: 700 72 | # 73 | # For details regarding fonts from package dependencies, 74 | # see https://flutter.dev/custom-fonts/#from-packages 75 | -------------------------------------------------------------------------------- /lib/widgets/drawer.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:kubico/src/global/const-global.dart'; 3 | 4 | class DrawerWidget extends StatelessWidget { 5 | 6 | List _options = [ 7 | MenuDrawer(Icons.home, "Home"), 8 | MenuDrawer(Icons.person, "Profile"), 9 | MenuDrawer(Icons.location_on, "Nearby me "), 10 | MenuDrawer(Icons.favorite, "Favorites"), 11 | MenuDrawer(Icons.notification_important, "Notifications"), 12 | MenuDrawer(Icons.edit, "Promotions"), 13 | MenuDrawer(Icons.settings, "Settings"), 14 | MenuDrawer(Icons.help, "Help"), 15 | MenuDrawer(Icons.exit_to_app, "Logout") 16 | ]; 17 | 18 | Widget menuItem(IconData icon, String nome) { 19 | return Container( 20 | margin: EdgeInsets.only(right: 50, bottom: 5, top: 5), 21 | height: 45, 22 | decoration: BoxDecoration( 23 | color: Colors.white, 24 | borderRadius: BorderRadius.only( 25 | topRight: Radius.circular(30), 26 | bottomRight: Radius.circular(30) 27 | ) 28 | ), 29 | child: Row( 30 | children: [ 31 | SizedBox(width: 40,), 32 | Icon(icon, color: colorPrimary,), 33 | SizedBox(width: 20,), 34 | Text( 35 | nome, 36 | style: TextStyle( 37 | color: colorPrimary, 38 | fontSize: 17.0, 39 | fontWeight: FontWeight.bold 40 | ), 41 | ) 42 | ], 43 | ), 44 | ); 45 | } 46 | 47 | @override 48 | Widget build(BuildContext context) { 49 | return Drawer( 50 | child: Container( 51 | color: colorPrimary, 52 | child: ListView( 53 | children: [ 54 | ListTile( 55 | leading: Container( 56 | height: 60, 57 | width: 60, 58 | decoration: BoxDecoration( 59 | color: Colors.white, 60 | shape: BoxShape.circle 61 | ), 62 | ), 63 | title: Text( 64 | "Dorivaldo dos Santos", 65 | style: TextStyle( 66 | fontSize: 18, 67 | color: Colors.white 68 | ), 69 | ), 70 | subtitle: Text( 71 | "dorivaldo.santos@df.co.ao", 72 | style: TextStyle(color: Colors.white), 73 | ), 74 | ), 75 | Container( 76 | height: .2, 77 | margin: EdgeInsets.symmetric(horizontal: 20), 78 | color: Colors.white, 79 | ), 80 | ListView.builder( 81 | shrinkWrap: true, 82 | itemCount: _options.length, 83 | itemBuilder: (context, index) { 84 | return menuItem(_options[index].iconData, _options[index].name); 85 | }, 86 | ) 87 | ], 88 | ), 89 | ), 90 | ); 91 | } 92 | } 93 | 94 | 95 | 96 | class MenuDrawer { 97 | final IconData iconData; 98 | final String name; 99 | MenuDrawer(this.iconData, this.name); 100 | } -------------------------------------------------------------------------------- /lib/widgets/register-form.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | class RegisterForm extends StatefulWidget { 4 | @override 5 | _RegisterFormState createState() => _RegisterFormState(); 6 | } 7 | 8 | class _RegisterFormState extends State { 9 | @override 10 | Widget build(BuildContext context) { 11 | return Container( 12 | margin: EdgeInsets.symmetric(horizontal: 20), 13 | 14 | child: Center( 15 | child: Column( 16 | mainAxisAlignment: MainAxisAlignment.center, 17 | crossAxisAlignment: CrossAxisAlignment.center, 18 | children: [ 19 | Row( 20 | children: [ 21 | Icon( 22 | Icons.person, 23 | color: Colors.grey, 24 | ), 25 | SizedBox(width: 20,), 26 | Expanded( 27 | child: TextField( 28 | style: TextStyle( 29 | fontWeight: FontWeight.w300 30 | ), 31 | decoration: InputDecoration( 32 | hintText: 'Nome' 33 | ), 34 | ), 35 | ) 36 | ], 37 | ), 38 | SizedBox(height: 40,), 39 | Row( 40 | children: [ 41 | Icon( 42 | Icons.phone_android, 43 | color: Colors.grey, 44 | ), 45 | SizedBox(width: 20,), 46 | Expanded( 47 | child: TextField( 48 | style: TextStyle( 49 | fontWeight: FontWeight.w300 50 | ), 51 | decoration: InputDecoration( 52 | hintText: 'Correio electronico' 53 | ), 54 | ), 55 | ) 56 | ], 57 | ), 58 | SizedBox(height: 40,), 59 | Row( 60 | children: [ 61 | Icon( 62 | Icons.lock_open, 63 | color: Colors.grey, 64 | ), 65 | SizedBox(width: 20,), 66 | Expanded( 67 | child: TextField( 68 | style: TextStyle( 69 | fontWeight: FontWeight.w300 70 | ), 71 | decoration: InputDecoration( 72 | hintText: 'Palavra-passe' 73 | ), 74 | ), 75 | ) 76 | ], 77 | ), 78 | 79 | 80 | ], 81 | ) 82 | ) 83 | ); 84 | } 85 | } -------------------------------------------------------------------------------- /pubspec.lock: -------------------------------------------------------------------------------- 1 | # Generated by pub 2 | # See https://dart.dev/tools/pub/glossary#lockfile 3 | packages: 4 | async: 5 | dependency: transitive 6 | description: 7 | name: async 8 | url: "https://pub.dartlang.org" 9 | source: hosted 10 | version: "2.2.0" 11 | boolean_selector: 12 | dependency: transitive 13 | description: 14 | name: boolean_selector 15 | url: "https://pub.dartlang.org" 16 | source: hosted 17 | version: "1.0.4" 18 | charcode: 19 | dependency: transitive 20 | description: 21 | name: charcode 22 | url: "https://pub.dartlang.org" 23 | source: hosted 24 | version: "1.1.2" 25 | collection: 26 | dependency: transitive 27 | description: 28 | name: collection 29 | url: "https://pub.dartlang.org" 30 | source: hosted 31 | version: "1.14.11" 32 | cupertino_icons: 33 | dependency: "direct main" 34 | description: 35 | name: cupertino_icons 36 | url: "https://pub.dartlang.org" 37 | source: hosted 38 | version: "0.1.2" 39 | flutter: 40 | dependency: "direct main" 41 | description: flutter 42 | source: sdk 43 | version: "0.0.0" 44 | flutter_test: 45 | dependency: "direct dev" 46 | description: flutter 47 | source: sdk 48 | version: "0.0.0" 49 | font_awesome_flutter: 50 | dependency: "direct main" 51 | description: 52 | name: font_awesome_flutter 53 | url: "https://pub.dartlang.org" 54 | source: hosted 55 | version: "8.5.0" 56 | matcher: 57 | dependency: transitive 58 | description: 59 | name: matcher 60 | url: "https://pub.dartlang.org" 61 | source: hosted 62 | version: "0.12.5" 63 | meta: 64 | dependency: transitive 65 | description: 66 | name: meta 67 | url: "https://pub.dartlang.org" 68 | source: hosted 69 | version: "1.1.6" 70 | path: 71 | dependency: transitive 72 | description: 73 | name: path 74 | url: "https://pub.dartlang.org" 75 | source: hosted 76 | version: "1.6.2" 77 | pedantic: 78 | dependency: transitive 79 | description: 80 | name: pedantic 81 | url: "https://pub.dartlang.org" 82 | source: hosted 83 | version: "1.7.0" 84 | quiver: 85 | dependency: transitive 86 | description: 87 | name: quiver 88 | url: "https://pub.dartlang.org" 89 | source: hosted 90 | version: "2.0.3" 91 | sky_engine: 92 | dependency: transitive 93 | description: flutter 94 | source: sdk 95 | version: "0.0.99" 96 | source_span: 97 | dependency: transitive 98 | description: 99 | name: source_span 100 | url: "https://pub.dartlang.org" 101 | source: hosted 102 | version: "1.5.5" 103 | stack_trace: 104 | dependency: transitive 105 | description: 106 | name: stack_trace 107 | url: "https://pub.dartlang.org" 108 | source: hosted 109 | version: "1.9.3" 110 | stream_channel: 111 | dependency: transitive 112 | description: 113 | name: stream_channel 114 | url: "https://pub.dartlang.org" 115 | source: hosted 116 | version: "2.0.0" 117 | string_scanner: 118 | dependency: transitive 119 | description: 120 | name: string_scanner 121 | url: "https://pub.dartlang.org" 122 | source: hosted 123 | version: "1.0.4" 124 | term_glyph: 125 | dependency: transitive 126 | description: 127 | name: term_glyph 128 | url: "https://pub.dartlang.org" 129 | source: hosted 130 | version: "1.1.0" 131 | test_api: 132 | dependency: transitive 133 | description: 134 | name: test_api 135 | url: "https://pub.dartlang.org" 136 | source: hosted 137 | version: "0.2.5" 138 | typed_data: 139 | dependency: transitive 140 | description: 141 | name: typed_data 142 | url: "https://pub.dartlang.org" 143 | source: hosted 144 | version: "1.1.6" 145 | vector_math: 146 | dependency: transitive 147 | description: 148 | name: vector_math 149 | url: "https://pub.dartlang.org" 150 | source: hosted 151 | version: "2.0.8" 152 | sdks: 153 | dart: ">=2.2.2 <3.0.0" 154 | -------------------------------------------------------------------------------- /android/gradlew: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | ############################################################################## 4 | ## 5 | ## Gradle start up script for UN*X 6 | ## 7 | ############################################################################## 8 | 9 | # Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. 10 | DEFAULT_JVM_OPTS="" 11 | 12 | APP_NAME="Gradle" 13 | APP_BASE_NAME=`basename "$0"` 14 | 15 | # Use the maximum available, or set MAX_FD != -1 to use that value. 16 | MAX_FD="maximum" 17 | 18 | warn ( ) { 19 | echo "$*" 20 | } 21 | 22 | die ( ) { 23 | echo 24 | echo "$*" 25 | echo 26 | exit 1 27 | } 28 | 29 | # OS specific support (must be 'true' or 'false'). 30 | cygwin=false 31 | msys=false 32 | darwin=false 33 | case "`uname`" in 34 | CYGWIN* ) 35 | cygwin=true 36 | ;; 37 | Darwin* ) 38 | darwin=true 39 | ;; 40 | MINGW* ) 41 | msys=true 42 | ;; 43 | esac 44 | 45 | # Attempt to set APP_HOME 46 | # Resolve links: $0 may be a link 47 | PRG="$0" 48 | # Need this for relative symlinks. 49 | while [ -h "$PRG" ] ; do 50 | ls=`ls -ld "$PRG"` 51 | link=`expr "$ls" : '.*-> \(.*\)$'` 52 | if expr "$link" : '/.*' > /dev/null; then 53 | PRG="$link" 54 | else 55 | PRG=`dirname "$PRG"`"/$link" 56 | fi 57 | done 58 | SAVED="`pwd`" 59 | cd "`dirname \"$PRG\"`/" >/dev/null 60 | APP_HOME="`pwd -P`" 61 | cd "$SAVED" >/dev/null 62 | 63 | CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar 64 | 65 | # Determine the Java command to use to start the JVM. 66 | if [ -n "$JAVA_HOME" ] ; then 67 | if [ -x "$JAVA_HOME/jre/sh/java" ] ; then 68 | # IBM's JDK on AIX uses strange locations for the executables 69 | JAVACMD="$JAVA_HOME/jre/sh/java" 70 | else 71 | JAVACMD="$JAVA_HOME/bin/java" 72 | fi 73 | if [ ! -x "$JAVACMD" ] ; then 74 | die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME 75 | 76 | Please set the JAVA_HOME variable in your environment to match the 77 | location of your Java installation." 78 | fi 79 | else 80 | JAVACMD="java" 81 | which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 82 | 83 | Please set the JAVA_HOME variable in your environment to match the 84 | location of your Java installation." 85 | fi 86 | 87 | # Increase the maximum file descriptors if we can. 88 | if [ "$cygwin" = "false" -a "$darwin" = "false" ] ; then 89 | MAX_FD_LIMIT=`ulimit -H -n` 90 | if [ $? -eq 0 ] ; then 91 | if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then 92 | MAX_FD="$MAX_FD_LIMIT" 93 | fi 94 | ulimit -n $MAX_FD 95 | if [ $? -ne 0 ] ; then 96 | warn "Could not set maximum file descriptor limit: $MAX_FD" 97 | fi 98 | else 99 | warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT" 100 | fi 101 | fi 102 | 103 | # For Darwin, add options to specify how the application appears in the dock 104 | if $darwin; then 105 | GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\"" 106 | fi 107 | 108 | # For Cygwin, switch paths to Windows format before running java 109 | if $cygwin ; then 110 | APP_HOME=`cygpath --path --mixed "$APP_HOME"` 111 | CLASSPATH=`cygpath --path --mixed "$CLASSPATH"` 112 | JAVACMD=`cygpath --unix "$JAVACMD"` 113 | 114 | # We build the pattern for arguments to be converted via cygpath 115 | ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null` 116 | SEP="" 117 | for dir in $ROOTDIRSRAW ; do 118 | ROOTDIRS="$ROOTDIRS$SEP$dir" 119 | SEP="|" 120 | done 121 | OURCYGPATTERN="(^($ROOTDIRS))" 122 | # Add a user-defined pattern to the cygpath arguments 123 | if [ "$GRADLE_CYGPATTERN" != "" ] ; then 124 | OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)" 125 | fi 126 | # Now convert the arguments - kludge to limit ourselves to /bin/sh 127 | i=0 128 | for arg in "$@" ; do 129 | CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -` 130 | CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option 131 | 132 | if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition 133 | eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"` 134 | else 135 | eval `echo args$i`="\"$arg\"" 136 | fi 137 | i=$((i+1)) 138 | done 139 | case $i in 140 | (0) set -- ;; 141 | (1) set -- "$args0" ;; 142 | (2) set -- "$args0" "$args1" ;; 143 | (3) set -- "$args0" "$args1" "$args2" ;; 144 | (4) set -- "$args0" "$args1" "$args2" "$args3" ;; 145 | (5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;; 146 | (6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;; 147 | (7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;; 148 | (8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;; 149 | (9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;; 150 | esac 151 | fi 152 | 153 | # Split up the JVM_OPTS And GRADLE_OPTS values into an array, following the shell quoting and substitution rules 154 | function splitJvmOpts() { 155 | JVM_OPTS=("$@") 156 | } 157 | eval splitJvmOpts $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS 158 | JVM_OPTS[${#JVM_OPTS[*]}]="-Dorg.gradle.appname=$APP_BASE_NAME" 159 | 160 | exec "$JAVACMD" "${JVM_OPTS[@]}" -classpath "$CLASSPATH" org.gradle.wrapper.GradleWrapperMain "$@" 161 | -------------------------------------------------------------------------------- /lib/pages/login.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/cupertino.dart'; 2 | import 'package:flutter/material.dart'; 3 | import 'package:font_awesome_flutter/font_awesome_flutter.dart'; 4 | import 'package:kubico/src/pages/home.dart'; 5 | import 'package:kubico/src/widgets/login.dart'; 6 | import 'package:kubico/src/widgets/register-form.dart'; 7 | 8 | class Login extends StatefulWidget { 9 | @override 10 | _LoginState createState() => _LoginState(); 11 | } 12 | 13 | class _LoginState extends State with SingleTickerProviderStateMixin{ 14 | 15 | AnimationController _animationController; 16 | Animation _animation; 17 | 18 | @override 19 | void initState() { 20 | _animationController = AnimationController(vsync: this, duration: Duration(milliseconds: 400)); 21 | _animation = Tween(begin: 0.0, end: 1.0).animate(_animationController); 22 | 23 | super.initState(); 24 | } 25 | final styleIndicator = TextStyle( 26 | color: Colors.white, 27 | fontSize: 16, 28 | fontWeight: FontWeight.w300, 29 | ); 30 | 31 | bool status = true; 32 | 33 | @override 34 | Widget build(BuildContext context) { 35 | _animationController.forward(); 36 | final size = MediaQuery.of(context).size; 37 | return Scaffold( 38 | backgroundColor: Colors.white, 39 | body: SingleChildScrollView( 40 | child: Column( 41 | children: [ 42 | Container( 43 | height: size.height / 2, 44 | width: size.width, 45 | margin: EdgeInsets.symmetric(horizontal: 12), 46 | padding: EdgeInsets.only(bottom: 2), 47 | decoration: BoxDecoration( 48 | color: Colors.transparent, 49 | borderRadius: BorderRadius.only( 50 | bottomLeft: Radius.circular(20), 51 | bottomRight: Radius.circular(20)), 52 | boxShadow: [BoxShadow(color: Colors.grey, blurRadius: 3,)]), 53 | child: ClipRRect( 54 | borderRadius: BorderRadius.only( 55 | bottomLeft: Radius.circular(20), 56 | bottomRight: Radius.circular(20)), 57 | child: Stack( 58 | children: [ 59 | Image.asset('assets/imgs/pexels-photo-2631746.jpg', 60 | height: size.height / 2, fit: BoxFit.cover), 61 | Container( 62 | height: size.height / 2, 63 | decoration: BoxDecoration( 64 | gradient: LinearGradient( 65 | colors: [ 66 | Colors.transparent, 67 | Colors.black.withOpacity(.75), 68 | ], 69 | begin: Alignment.topCenter, 70 | end: Alignment.bottomCenter)), 71 | child: Align( 72 | alignment: Alignment.bottomCenter, 73 | child: Row( 74 | mainAxisAlignment: MainAxisAlignment.end, 75 | children: [ 76 | Container( 77 | height: 50, 78 | width: 190, 79 | padding: EdgeInsets.only(right: 15), 80 | child: Column( 81 | children: [ 82 | Row( 83 | mainAxisAlignment: 84 | MainAxisAlignment.spaceBetween, 85 | children: [ 86 | InkWell( 87 | onTap: (){setState(() { 88 | _animationController.reset(); 89 | status = true; 90 | });}, 91 | child: Text("Entrar".toUpperCase(), 92 | style: styleIndicator), 93 | ), 94 | InkWell( 95 | onTap: () {setState(() { 96 | _animationController.reset(); 97 | status = false; 98 | });}, 99 | child: Text( 100 | "Registar".toUpperCase(), 101 | style: styleIndicator, 102 | ), 103 | ) 104 | ], 105 | ), 106 | SizedBox( 107 | height: 2, 108 | ), 109 | AnimatedAlign( 110 | duration: Duration(milliseconds: 400), 111 | alignment: status ? Alignment.centerLeft : Alignment.centerRight, 112 | child: AnimatedContainer( 113 | duration: Duration(milliseconds: 400), 114 | width: status ? 50 : 60, 115 | height: 1.5, 116 | color: Colors.white, 117 | ), 118 | ) 119 | ], 120 | ), 121 | ) 122 | ], 123 | ), 124 | ), 125 | ) 126 | ], 127 | ), 128 | ), 129 | ), 130 | SizedBox(height: 40,), 131 | FadeTransition( 132 | opacity: _animation, 133 | child: status ? LoginForm() : RegisterForm(), 134 | ) 135 | 136 | ], 137 | ), 138 | ), 139 | bottomNavigationBar: Container( 140 | padding: EdgeInsets.symmetric(horizontal: 12, vertical: 1), 141 | height: 80, 142 | // color: Colors.red, 143 | child: Row( 144 | mainAxisAlignment: MainAxisAlignment.spaceBetween, 145 | children: [ 146 | Container( 147 | width: 120, 148 | // color: Colors.blue, 149 | child: Row( 150 | mainAxisAlignment: MainAxisAlignment.spaceBetween, 151 | children: [ 152 | Icon( 153 | FontAwesomeIcons.longArrowAltLeft, 154 | ), 155 | Text( 156 | "Social Login" 157 | ) 158 | ], 159 | ), 160 | ), 161 | FloatingActionButton( 162 | onPressed: () => Navigator.of(context).push(MaterialPageRoute(builder: (context) => Home())), 163 | backgroundColor: Colors.green, 164 | child: Icon( 165 | FontAwesomeIcons.longArrowAltRight, 166 | size: 27, 167 | ), 168 | ) 169 | ], 170 | ), 171 | ) , 172 | 173 | ); 174 | } 175 | } 176 | -------------------------------------------------------------------------------- /lib/widgets/tela_vertical.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:font_awesome_flutter/font_awesome_flutter.dart'; 3 | import 'package:kubico/src/pages/login.dart'; 4 | import 'package:kubico/src/tabs/carousel-tab.dart'; 5 | 6 | class TelaVertical extends StatefulWidget { 7 | final TabController _tabController; 8 | TelaVertical(this._tabController); 9 | @override 10 | _TelaVerticalState createState() => _TelaVerticalState(_tabController); 11 | } 12 | 13 | class _TelaVerticalState extends State { 14 | final TabController _tabController; 15 | _TelaVerticalState(this._tabController); 16 | @override 17 | Widget build(BuildContext context) { 18 | final size = MediaQuery.of(context).size; 19 | return DefaultTabController( 20 | length: 3, 21 | child: Scaffold( 22 | backgroundColor: Colors.white, 23 | body: Padding( 24 | padding: 25 | const EdgeInsets.only(left: 12, right: 12, top: 30, bottom: 10), 26 | child: Column( 27 | children: [ 28 | Container( 29 | width: size.width, 30 | padding: EdgeInsets.only(bottom: 2), 31 | decoration: BoxDecoration( 32 | color: Colors.transparent, 33 | borderRadius: BorderRadius.circular(20), 34 | boxShadow: [ 35 | BoxShadow( 36 | color: Colors.grey, 37 | blurRadius: 3, 38 | ) 39 | ]), 40 | child: ClipRRect( 41 | borderRadius: BorderRadius.circular(20), 42 | child: Stack( 43 | children: [ 44 | Container( 45 | height: size.height / 1.3, 46 | child: TabBarView( 47 | controller: _tabController, 48 | children: [ 49 | CarouselTab( 50 | 'assets/imgs/pexels-photo-2462015.jpg'), 51 | CarouselTab( 52 | 'assets/imgs/pexels-photo-106399.jpg'), 53 | CarouselTab( 54 | 'assets/imgs/pexels-photo-2499969.jpg') 55 | ], 56 | ), 57 | ), 58 | Positioned( 59 | bottom: 10, 60 | child: Padding( 61 | padding: const EdgeInsets.all(8.0), 62 | child: Row( 63 | mainAxisAlignment: MainAxisAlignment.spaceBetween, 64 | children: [ 65 | AnimatedContainer( 66 | duration: Duration(milliseconds: 400), 67 | height: 10, 68 | width: _tabController.index == 0 ? 40 : 20, 69 | decoration: BoxDecoration( 70 | color: _tabController.index == 0 71 | ? Colors.white 72 | : Colors.white54, 73 | borderRadius: BorderRadius.circular(30)), 74 | ), 75 | SizedBox( 76 | width: 10, 77 | ), 78 | AnimatedContainer( 79 | duration: Duration(milliseconds: 400), 80 | height: 10, 81 | width: _tabController.index == 1 ? 40 : 20, 82 | decoration: BoxDecoration( 83 | color: _tabController.index == 1 84 | ? Colors.white 85 | : Colors.white54, 86 | borderRadius: BorderRadius.circular(30)), 87 | ), 88 | SizedBox( 89 | width: 10, 90 | ), 91 | AnimatedContainer( 92 | duration: Duration(milliseconds: 400), 93 | height: 10, 94 | width: _tabController.index == 2 ? 40 : 20, 95 | decoration: BoxDecoration( 96 | color: _tabController.index == 2 97 | ? Colors.white 98 | : Colors.white54, 99 | borderRadius: BorderRadius.circular(30)), 100 | ) 101 | ], 102 | ), 103 | ), 104 | ) 105 | ], 106 | )), 107 | ), 108 | Padding( 109 | padding: const EdgeInsets.only(top: 20.0), 110 | child: Column( 111 | 112 | children: [ 113 | 114 | Text( 115 | "ENTRAR PARA CONTINUAR", 116 | style: TextStyle( 117 | color: Colors.black, 118 | fontSize: 18, 119 | fontWeight: FontWeight.w400), 120 | ), 121 | Divider() 122 | ], 123 | ), 124 | ) 125 | ], 126 | ), 127 | ), 128 | bottomNavigationBar: Padding( 129 | padding: const EdgeInsets.only(left: 16.0, right: 16.0, bottom: 16.0), 130 | child: Row( 131 | mainAxisAlignment: MainAxisAlignment.spaceBetween, 132 | children: [ 133 | Container( 134 | width: 55, 135 | height: 55, 136 | decoration: BoxDecoration( 137 | color: Colors.white, 138 | shape: BoxShape.circle, 139 | border: Border.all( 140 | width: 1, 141 | style: BorderStyle.solid, 142 | color: Colors.green)), 143 | child: Center( 144 | child: IconButton( 145 | onPressed: () {}, 146 | icon: Icon( 147 | FontAwesomeIcons.facebookF, 148 | color: Colors.green, 149 | ), 150 | ), 151 | ), 152 | ), 153 | SizedBox( 154 | width: 15, 155 | ), 156 | Container( 157 | width: 55, 158 | height: 55, 159 | decoration: BoxDecoration( 160 | color: Colors.white, 161 | shape: BoxShape.circle, 162 | border: Border.all( 163 | width: 1, 164 | style: BorderStyle.solid, 165 | color: Colors.green)), 166 | child: Center( 167 | child: IconButton( 168 | onPressed: () {}, 169 | icon: Icon( 170 | FontAwesomeIcons.google, 171 | color: Colors.green, 172 | ), 173 | ), 174 | ), 175 | ), 176 | SizedBox( 177 | width: 15, 178 | ), 179 | 180 | Spacer(), 181 | GestureDetector( 182 | onTap: () => Navigator.of(context) 183 | .push(MaterialPageRoute(builder: (context) { 184 | return Login(); 185 | })), 186 | child: Container( 187 | width: 170, 188 | height: 50, 189 | decoration: BoxDecoration( 190 | color: Colors.white, 191 | borderRadius: BorderRadius.circular(100), 192 | border: Border.all( 193 | width: 1, 194 | style: BorderStyle.solid, 195 | color: Colors.green)), 196 | child: Center( 197 | child: Row( 198 | mainAxisAlignment: MainAxisAlignment.center, 199 | children: [ 200 | Icon( 201 | Icons.phone_android, 202 | color: Colors.green, 203 | ), 204 | SizedBox(width: 10,), 205 | Text( 206 | "Telefone".toUpperCase(), 207 | style: TextStyle( 208 | color: Colors.green, 209 | fontSize: 18, 210 | fontWeight: FontWeight.w400), 211 | ), 212 | ], 213 | )), 214 | ), 215 | ) 216 | ], 217 | ), 218 | ), 219 | ), 220 | ); 221 | } 222 | } -------------------------------------------------------------------------------- /lib/widgets/tela_horizontal.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:font_awesome_flutter/font_awesome_flutter.dart'; 3 | import 'package:kubico/src/pages/login.dart'; 4 | import 'package:kubico/src/tabs/carousel-tab.dart'; 5 | 6 | class TelaHorizontal extends StatefulWidget { 7 | final TabController _tabController; 8 | TelaHorizontal(this._tabController); 9 | @override 10 | _TelaHorizontalState createState() => _TelaHorizontalState(_tabController); 11 | } 12 | 13 | class _TelaHorizontalState extends State { 14 | final TabController _tabController; 15 | _TelaHorizontalState(this._tabController); 16 | @override 17 | Widget build(BuildContext context) { 18 | final size = MediaQuery.of(context).size; 19 | return DefaultTabController( 20 | length: 3, 21 | child: Scaffold( 22 | backgroundColor: Colors.white, 23 | body: Padding( 24 | padding: 25 | const EdgeInsets.only(left: 12, right: 12, top: 30, bottom: 10), 26 | child: Row( 27 | children: [ 28 | Flexible( 29 | flex: 1, 30 | child: Column( 31 | crossAxisAlignment: CrossAxisAlignment.start, 32 | children: [ 33 | Container( 34 | // width: size.width / 2, 35 | 36 | decoration: BoxDecoration( 37 | color: Colors.transparent, 38 | borderRadius: BorderRadius.circular(20), 39 | boxShadow: [ 40 | BoxShadow( 41 | color: Colors.grey, 42 | blurRadius: 3, 43 | ) 44 | ]), 45 | child: ClipRRect( 46 | borderRadius: BorderRadius.circular(20), 47 | child: Stack( 48 | children: [ 49 | Container( 50 | height: size.height - 55, 51 | width: size.width / 2, 52 | child: TabBarView( 53 | controller: _tabController, 54 | children: [ 55 | CarouselTab( 56 | 'assets/imgs/pexels-photo-2462015.jpg'), 57 | CarouselTab( 58 | 'assets/imgs/pexels-photo-106399.jpg'), 59 | CarouselTab( 60 | 'assets/imgs/pexels-photo-2499969.jpg') 61 | ], 62 | ), 63 | ), 64 | Positioned( 65 | bottom: 10, 66 | child: Padding( 67 | padding: const EdgeInsets.all(8.0), 68 | child: Row( 69 | mainAxisAlignment: 70 | MainAxisAlignment.spaceBetween, 71 | children: [ 72 | AnimatedContainer( 73 | duration: Duration(milliseconds: 400), 74 | height: 10, 75 | width: 76 | _tabController.index == 0 ? 40 : 20, 77 | decoration: BoxDecoration( 78 | color: _tabController.index == 0 79 | ? Colors.white 80 | : Colors.white54, 81 | borderRadius: 82 | BorderRadius.circular(30)), 83 | ), 84 | SizedBox( 85 | width: 10, 86 | ), 87 | AnimatedContainer( 88 | duration: Duration(milliseconds: 400), 89 | height: 10, 90 | width: 91 | _tabController.index == 1 ? 40 : 20, 92 | decoration: BoxDecoration( 93 | color: _tabController.index == 1 94 | ? Colors.white 95 | : Colors.white54, 96 | borderRadius: 97 | BorderRadius.circular(30)), 98 | ), 99 | SizedBox( 100 | width: 10, 101 | ), 102 | AnimatedContainer( 103 | duration: Duration(milliseconds: 400), 104 | height: 10, 105 | width: 106 | _tabController.index == 2 ? 40 : 20, 107 | decoration: BoxDecoration( 108 | color: _tabController.index == 2 109 | ? Colors.white 110 | : Colors.white54, 111 | borderRadius: 112 | BorderRadius.circular(30)), 113 | ) 114 | ], 115 | ), 116 | ), 117 | ) 118 | ], 119 | )), 120 | ), 121 | ], 122 | ), 123 | ), 124 | Flexible( 125 | flex: 1, 126 | child: Container( 127 | child: Padding( 128 | padding: const EdgeInsets.only( 129 | left: 16.0, right: 16.0, bottom: 16.0), 130 | child: Column( 131 | crossAxisAlignment: CrossAxisAlignment.center, 132 | mainAxisAlignment: MainAxisAlignment.center, 133 | children: [ 134 | Text( 135 | "ENTRAR PARA CONTINUAR", 136 | style: TextStyle( 137 | color: Colors.black, 138 | fontSize: 18, 139 | fontWeight: FontWeight.w400), 140 | ), 141 | Divider(), 142 | Container( 143 | height: 50, 144 | decoration: BoxDecoration( 145 | color: Colors.white, 146 | borderRadius: BorderRadius.circular(100), 147 | border: Border.all( 148 | width: 1, 149 | style: BorderStyle.solid, 150 | color: Colors.green)), 151 | child: Center( 152 | child: Row( 153 | mainAxisAlignment: MainAxisAlignment.center, 154 | children: [ 155 | Icon( 156 | FontAwesomeIcons.facebookF, 157 | color: Colors.green, 158 | ), 159 | SizedBox( 160 | width: 10, 161 | ), 162 | Text( 163 | "Facebook".toUpperCase(), 164 | style: TextStyle( 165 | color: Colors.green, 166 | fontSize: 18, 167 | fontWeight: FontWeight.w400), 168 | ), 169 | ], 170 | )), 171 | ), 172 | SizedBox( 173 | height: 10, 174 | ), 175 | Container( 176 | height: 50, 177 | decoration: BoxDecoration( 178 | color: Colors.white, 179 | borderRadius: BorderRadius.circular(100), 180 | border: Border.all( 181 | width: 1, 182 | style: BorderStyle.solid, 183 | color: Colors.green)), 184 | child: Center( 185 | child: Row( 186 | mainAxisAlignment: MainAxisAlignment.center, 187 | children: [ 188 | Icon( 189 | FontAwesomeIcons.google, 190 | color: Colors.green, 191 | ), 192 | SizedBox( 193 | width: 10, 194 | ), 195 | Text( 196 | "Google".toUpperCase(), 197 | style: TextStyle( 198 | color: Colors.green, 199 | fontSize: 18, 200 | fontWeight: FontWeight.w400), 201 | ), 202 | ], 203 | )), 204 | ), 205 | SizedBox( 206 | height: 10, 207 | ), 208 | Container( 209 | height: 50, 210 | decoration: BoxDecoration( 211 | color: Colors.white, 212 | borderRadius: BorderRadius.circular(100), 213 | border: Border.all( 214 | width: 1, 215 | style: BorderStyle.solid, 216 | color: Colors.green)), 217 | child: Center( 218 | child: Row( 219 | mainAxisAlignment: MainAxisAlignment.center, 220 | children: [ 221 | Icon( 222 | FontAwesomeIcons.twitter, 223 | color: Colors.green, 224 | ), 225 | SizedBox( 226 | width: 10, 227 | ), 228 | Text( 229 | "Twitter".toUpperCase(), 230 | style: TextStyle( 231 | color: Colors.green, 232 | fontSize: 18, 233 | fontWeight: FontWeight.w400), 234 | ), 235 | ], 236 | )), 237 | ), 238 | SizedBox( 239 | height: 10, 240 | ), 241 | GestureDetector( 242 | onTap: () => Navigator.of(context) 243 | .push(MaterialPageRoute(builder: (context) { 244 | return Login(); 245 | })), 246 | child: Container( 247 | height: 50, 248 | decoration: BoxDecoration( 249 | color: Colors.white, 250 | borderRadius: BorderRadius.circular(100), 251 | border: Border.all( 252 | width: 1, 253 | style: BorderStyle.solid, 254 | color: Colors.green)), 255 | child: Center( 256 | child: Row( 257 | mainAxisAlignment: MainAxisAlignment.center, 258 | children: [ 259 | Icon( 260 | Icons.phone_android, 261 | color: Colors.green, 262 | ), 263 | SizedBox( 264 | width: 10, 265 | ), 266 | Text( 267 | "Telefone".toUpperCase(), 268 | style: TextStyle( 269 | color: Colors.green, 270 | fontSize: 18, 271 | fontWeight: FontWeight.w400), 272 | ), 273 | ], 274 | )), 275 | ), 276 | ) 277 | ], 278 | ), 279 | )), 280 | ) 281 | ], 282 | ), 283 | ), 284 | // bottomNavigationBar: Padding( 285 | // padding: const EdgeInsets.only(left: 16.0, right: 16.0, bottom: 16.0), 286 | // child: Row( 287 | // mainAxisAlignment: MainAxisAlignment.spaceBetween, 288 | // children: [ 289 | // Container( 290 | // width: 55, 291 | // height: 55, 292 | // decoration: BoxDecoration( 293 | // color: Colors.white, 294 | // shape: BoxShape.circle, 295 | // border: Border.all( 296 | // width: 1, 297 | // style: BorderStyle.solid, 298 | // color: Colors.green)), 299 | // child: Center( 300 | // child: IconButton( 301 | // onPressed: () {}, 302 | // icon: Icon( 303 | // FontAwesomeIcons.facebookF, 304 | // color: Colors.green, 305 | // ), 306 | // ), 307 | // ), 308 | // ), 309 | // SizedBox( 310 | // width: 15, 311 | // ), 312 | // Container( 313 | // width: 55, 314 | // height: 55, 315 | // decoration: BoxDecoration( 316 | // color: Colors.white, 317 | // shape: BoxShape.circle, 318 | // border: Border.all( 319 | // width: 1, 320 | // style: BorderStyle.solid, 321 | // color: Colors.green)), 322 | // child: Center( 323 | // child: IconButton( 324 | // onPressed: () {}, 325 | // icon: Icon( 326 | // FontAwesomeIcons.google, 327 | // color: Colors.green, 328 | // ), 329 | // ), 330 | // ), 331 | // ), 332 | // SizedBox( 333 | // width: 15, 334 | // ), 335 | // Container( 336 | // width: 55, 337 | // height: 55, 338 | // decoration: BoxDecoration( 339 | // color: Colors.white, 340 | // shape: BoxShape.circle, 341 | // border: Border.all( 342 | // width: 1, 343 | // style: BorderStyle.solid, 344 | // color: Colors.green)), 345 | // child: Center( 346 | // child: IconButton( 347 | // onPressed: () {}, 348 | // icon: Icon( 349 | // FontAwesomeIcons.twitter, 350 | // color: Colors.green, 351 | // ), 352 | // ), 353 | // ), 354 | // ), 355 | // Spacer(), 356 | // GestureDetector( 357 | // onTap: () => Navigator.of(context) 358 | // .push(MaterialPageRoute(builder: (context) { 359 | // return Login(); 360 | // })), 361 | // child: Container( 362 | // width: 170, 363 | // height: 50, 364 | // decoration: BoxDecoration( 365 | // color: Colors.white, 366 | // borderRadius: BorderRadius.circular(100), 367 | // border: Border.all( 368 | // width: 1, 369 | // style: BorderStyle.solid, 370 | // color: Colors.green)), 371 | // child: Center( 372 | // child: Row( 373 | // mainAxisAlignment: MainAxisAlignment.center, 374 | // children: [ 375 | // Icon( 376 | // Icons.phone_android, 377 | // color: Colors.green, 378 | // ), 379 | // SizedBox(width: 10,), 380 | // Text( 381 | // "Telefone".toUpperCase(), 382 | // style: TextStyle( 383 | // color: Colors.green, 384 | // fontSize: 18, 385 | // fontWeight: FontWeight.w400), 386 | // ), 387 | // ], 388 | // )), 389 | // ), 390 | // ) 391 | // ], 392 | // ), 393 | // ), 394 | ), 395 | ); 396 | } 397 | } 398 | --------------------------------------------------------------------------------