Skip to content

Instantly share code, notes, and snippets.

View ABINASH56's full-sized avatar

Ram ABINASH56

  • Hanuram
  • Bhubaneswar
View GitHub Profile
@collinjackson
collinjackson / main.dart
Last active December 7, 2019 13:42
pomodoro timer example
import 'package:flutter/material.dart';
void main() {
runApp(new Container(
color: Colors.white,
));
runApp(new MaterialApp(
theme: new ThemeData(primarySwatch: Colors.red),
home: new HomePage(),
));
@braulio94
braulio94 / main.dart
Last active June 15, 2021 18:07
Flutter - Making a gradeint app body background using decoration
import 'package:flutter/material.dart';
//
// Created by Braulio Cassule
// 30 December 2017
//
void main() => runApp(new MyApp());
class MyApp extends StatelessWidget {
@mjohnsullivan
mjohnsullivan / quote.dart
Created June 25, 2018 23:20
Simple Flutter app to retrieve and display a quote of the day
import 'dart:async';
import 'dart:convert';
import 'package:flutter/material.dart';
import 'package:http/http.dart' as http;
void main() => runApp(MyApp());
class MyApp extends StatelessWidget {
@override
@mjohnsullivan
mjohnsullivan / rows_columns.dart
Created July 13, 2018 17:17
Using rows and columns to create an asymmetric grid-like layout
import 'package:flutter/material.dart';
void main() => runApp(MyApp());
class MyApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
return MaterialApp(
title: 'Flutter Demo',
theme: ThemeData(
@bluemix
bluemix / gradient-text-flutter.dart
Last active June 29, 2020 05:56
Creating text gradient in Flutter
import 'dart:ui' as ui;
import 'package:flutter/material.dart';
void main() => runApp(new MyApp());
class MyApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
final Shader linearGradient = LinearGradient(
@mjohnsullivan
mjohnsullivan / book_list.dart
Last active December 1, 2023 21:53
A simple book list Flutter example using the Google Books API
/*
Copyright 2018 The Chromium Authors. All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
met:
* Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above
@hillelcoren
hillelcoren / main.dart
Created January 11, 2019 11:15
Enable/disable dark mode with Redux
import 'package:flutter/material.dart';
import 'package:flutter_redux/flutter_redux.dart';
import 'package:redux/redux.dart';
void main() {
final store =
Store<AppState>(reducer, initialState: AppState(enableDarkMode: false));
runApp(MyApp(store: store));
}
@lukepighetti
lukepighetti / extents_page_view.dart
Last active January 3, 2023 13:48
Flutter PageView that loads the next/previous page off-screen
import 'package:flutter/gestures.dart';
import 'package:flutter/rendering.dart';
import 'package:flutter/widgets.dart' hide PageView;
/// This is copy-pasted from the Flutter framework with a support added for building
/// pages off screen using [Viewport.cacheExtents] and a [LayoutBuilder]
///
/// Based on commit 3932ffb1cd5dfa0c3891c60977ee4f9cd70ade66 on channel dev
// Having this global (mutable) page controller is a bit of a hack. We need it
@raviganwal
raviganwal / main.dart
Last active November 23, 2019 16:58
FoldingCellWithModel
import 'package:flutter/material.dart';
import 'package:folding_cell/folding_cell.dart';
void main() => runApp(MaterialApp(
home: SafeArea(
child: Scaffold(body: Material(child: FoldingCellListViewDemo())))));
class DemoModel {
String title, subtitle;