This file contains hidden or 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/material.dart'; | |
void main() { | |
runApp( | |
MaterialApp( | |
title: 'Hello From Flutter', // used by the OS task switcher | |
home: SafeArea( | |
child: Scaffold( | |
body: Center( | |
child: Text( |
This file contains hidden or 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
// from https://flutter.dev/docs/development/ui/widgets-intro | |
import 'package:flutter/material.dart'; | |
class Counter extends StatefulWidget { | |
// This class is the configuration for the state. | |
// It holds the values (in this case nothing) provided | |
// by the parent and used by the build method of the | |
// State. Fields in a Widget subclass are always marked | |
// "final". |
This file contains hidden or 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/material.dart'; | |
void main() { | |
runApp(MyApp()); | |
} | |
class MyApp extends StatelessWidget { | |
@override | |
Widget build(BuildContext context) { | |
return MaterialApp( |
This file contains hidden or 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/material.dart'; | |
/// Dart data model | |
class AppThemeValues { | |
final Color primaryColor; | |
final Color primaryBackgroundColor; | |
AppThemeValues( | |
{required this.primaryColor, required this.primaryBackgroundColor}); | |
} |
This file contains hidden or 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
var $window = $(window), | |
resizeInCooldown = false, | |
resizeTimeout; | |
function onResize() { | |
var resizeValue; | |
// only run this if we didn't run a update 150ms ago or less. | |
if ( !resizeInCooldown ) { | |
// orientation dictates what height and what width means. |
NewerOlder