This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: landingpage | |
description: Cross platform sample landing page implemented in Flutter | |
version: 1.0.0+1 | |
dependencies: | |
flutter_web: any | |
dev_dependencies: | |
flutter_web_test: any |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import 'package:flutter_web/material.dart'; | |
void main() => runApp(MyApp()); | |
class MyApp extends StatelessWidget { | |
// This widget is the root of your application. | |
@override | |
Widget build(BuildContext context) { | |
return MaterialApp( | |
title: 'Flutter to fly !', |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//Builds rectangle with circular corners and Text on it and next to it as title | |
Widget buildLogo() { | |
return Row( | |
children: <Widget>[ | |
Container( | |
width: 60, | |
height: 60, | |
decoration: BoxDecoration( | |
borderRadius: BorderRadius.circular(18), | |
gradient: LinearGradient(colors: [MyColors.blue1, MyColors.blue2], |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@override | |
Widget build(BuildContext context) { | |
return Padding( | |
padding: EdgeInsets.symmetric(horizontal: 45, vertical: 38), | |
child: buildHeader(), | |
); | |
} | |
Widget buildHeader() { | |
return Row( |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//Adds welcome text | |
Widget addWelcomeText() { | |
return FractionallySizedBox( | |
alignment: Alignment.centerLeft, //text aligned to left side | |
widthFactor: .6, //covers about half of the screen | |
child: Padding( | |
padding: EdgeInsets.only(left: 48), | |
child: Column( | |
crossAxisAlignment: CrossAxisAlignment.start, | |
mainAxisAlignment: MainAxisAlignment.center, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class EmailBox extends StatelessWidget { | |
@override | |
Widget build(BuildContext context) { | |
return Padding( | |
padding: EdgeInsets.only(left: 4.0, right: 74, top: 10, bottom: 40), | |
child: Container( | |
height: 60, | |
decoration: BoxDecoration( | |
color: MyColors.white1, | |
borderRadius: BorderRadius.circular(20), |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class ResponsiveWidget { | |
... | |
final Widget largeScreen; | |
final Widget mediumScreen; | |
final Widget smallScreen; | |
const ResponsiveWidget( | |
{Key key, this.largeScreen, this.mediumScreen, this.smallScreen}) | |
: super(key: key); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class SmallScreen extends StatelessWidget { | |
@override | |
Widget build(BuildContext context) { | |
return SingleChildScrollView( | |
child: Padding( | |
padding: EdgeInsets.all(40), | |
child: Column( | |
crossAxisAlignment: CrossAxisAlignment.start, | |
children: <Widget>[ | |
Text( |
OlderNewer