Skip to content

Instantly share code, notes, and snippets.

@jediyeti
jediyeti / stack_example.dart
Last active January 31, 2020 16:02
Stack Example
import 'package:flutter/material.dart';
void main() {
runApp(MaterialApp(home: MyApp()));
}
class MyApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
return Scaffold(
@jediyeti
jediyeti / rows_and_columns.dart
Created January 31, 2020 15:03
Rows And Columns Example
import 'package:flutter/material.dart';
import 'package:flutter/rendering.dart';
void main() {
debugPaintSizeEnabled = false;
runApp(MaterialApp(home: MyApp()));
}
class MyApp extends StatelessWidget {
@override
@jediyeti
jediyeti / container.dart
Created January 31, 2020 15:50
Container Example
import 'package:flutter/material.dart';
import 'package:flutter/rendering.dart';
void main() {
debugPaintSizeEnabled = false;
runApp(MaterialApp(home: MyApp()));
}
class MyApp extends StatelessWidget {
@override
@jediyeti
jediyeti / list_view_example.dart
Created February 1, 2020 17:52
ListView Example
import 'package:flutter/material.dart';
import 'package:flutter/rendering.dart';
void main() {
debugPaintSizeEnabled = false;
runApp(MaterialApp(home: MyApp()));
}
class MyApp extends StatelessWidget {
final List<Widget> widgetsList = [
@jediyeti
jediyeti / grid_view_example.dart
Created February 3, 2020 09:47
Grid View Example
import 'package:flutter/material.dart';
void main() {
runApp(MaterialApp(home: MyApp()));
}
class MyApp extends StatelessWidget {
final List<Widget> widgetsList = [
Container(
padding: const EdgeInsets.all(8),
@jediyeti
jediyeti / inherited.dart
Created February 4, 2020 10:12
Inherited Widget Ticking Example
import 'package:flutter/material.dart';
void main() {
runApp(RebuidingWidget());
}
class RebuidingWidget extends StatefulWidget {
@override
_RebuildingWidgetState createState() => _RebuildingWidgetState();
}
@jediyeti
jediyeti / inherited_widget_example.dart
Created February 4, 2020 10:37
Inherited Widget Example
import 'package:flutter/material.dart';
void main() {
runApp(
InitialCounterValueProvider(
value: 5,
child: MaterialApp(
title: 'Flutter Tutorial',
home: TutorialHome(),
),
import 'package:flutter/material.dart';
final Color darkBlue = Color.fromARGB(255, 18, 32, 47);
void main() {
runApp(MyApp());
}
class MyApp extends StatelessWidget {
@override