Skip to content

Instantly share code, notes, and snippets.

View jogboms's full-sized avatar
💙
Building Awesome w/ Dart & Flutter

Jeremiah Ogbomo jogboms

💙
Building Awesome w/ Dart & Flutter
View GitHub Profile
@slightfoot
slightfoot / number_input.dart
Last active August 25, 2023 14:51
Number Input Widget - For entering pins and other such things - #HumpDayQandA - 24th April 2019
// MIT License
//
// Copyright (c) 2023 Simon Lightfoot
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
@slightfoot
slightfoot / run_logged.dart
Created April 11, 2019 11:02
Logging your app's print statements to a local file for later processing.
import 'dart:async';
import 'dart:core';
import 'dart:io';
import 'package:flutter/material.dart';
import 'package:path/path.dart' as p;
import 'package:path_provider/path_provider.dart';
void main() => runLoggedApp(App());
import 'package:flutter/material.dart';
@immutable
class ClipShadowPath extends StatelessWidget {
final Shadow shadow;
final CustomClipper<Path> clipper;
final Widget child;
ClipShadowPath({
@required this.shadow,
@dru
dru / upload_progress.dart
Created December 26, 2018 12:53
Upload progress with Dart and Streams
import "dart:io";
import "dart:async";
main() async {
HttpClientRequest request =
await HttpClient().post('some.host', 8000, '/upload');
request.headers.contentType = ContentType.binary;
final file = File('/some/big/file');
@slightfoot
slightfoot / card_deck.dart
Last active March 30, 2019 22:54
Play Card Deck with Picking Animation - https://i.imgur.com/JKiNoJP.png
import 'dart:typed_data';
import 'package:flutter/material.dart';
import 'dart:convert' show base64;
import 'card_images.dart';
final Map<String, Uint8List> cardImages = {};
void main() async {
@rodydavis
rodydavis / Fastfile
Last active August 18, 2022 14:44
Top-level Fastfile for Flutter
# This file contains the fastlane.tools configuration
# You can find the documentation at https://docs.fastlane.tools
#
# For a list of all available actions, check out
#
# https://docs.fastlane.tools/actions
#
# For a list of all available plugins, check out
#
# https://docs.fastlane.tools/plugins/available-plugins
@bostrot
bostrot / CustomShowDialog.dart
Last active October 25, 2022 09:25
showDialog with rounded corners
// Copyright 2015 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
import 'dart:async';
import 'dart:ui';
import 'package:flutter/foundation.dart';
import 'package:flutter/widgets.dart';
@slightfoot
slightfoot / splash_intro.dart
Last active September 28, 2018 18:09
Splash Intro Slider Thing
import 'package:flutter/material.dart';
import 'package:meta/meta.dart';
import 'dart:convert' show base64;
class MyApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
return new MaterialApp(
debugShowCheckedModeBanner: false,
import 'package:flutter/material.dart';
void main() => runApp(new MyApp());
class MyApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
return new MaterialApp(
title: 'Flutter Demo',
theme: new ThemeData(

One of the main goals of [email protected] is to enable more flexible composition of UI. Let's start with some history. Before 4.0 we create Frame control for you (check application.ios.ts and frame.android.ts). Frame control allows you to do navigation forward or backward. While this is convenient it introduce other issues that can't be workaround easliy. For example if you want to have TabView in all pages you have to include it in the xml and set its selectedIndex so that once you navigate to different page a correct TabViewItem is selected. This leads to several problems:

  • parse more xml
  • increase memory usage
  • increase loading time

Same issues apply if you want to have SideDrawer control as a root component.

So in order to resolve these starting with 4.0 applicat