Skip to content

Instantly share code, notes, and snippets.

View leighajarett's full-sized avatar

Leigha Jarett leighajarett

View GitHub Profile
@leighajarett
leighajarett / main.dart
Created December 1, 2023 02:56
NavBar with navigators
import 'package:flutter/material.dart';
void main() => runApp(MyApp());
class MyApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
return MaterialApp(
home: Root(),
);
@leighajarett
leighajarett / main.dart
Created December 1, 2023 02:20
Starting navbar
import 'package:flutter/material.dart';
void main() => runApp(MyApp());
class MyApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
return MaterialApp(
home: Root(),
);
@leighajarett
leighajarett / gist:7115440c5fd754f74218e5e9dcd6c1ae
Created November 20, 2023 18:37
Custom page transition with tab bar
import 'package:flutter/material.dart';
import 'package:flutter/cupertino.dart';
import 'dart:math';
void main() => runApp(MyApp());
// More netural / iOS friendly theme
final ColorScheme iosColorScheme = ColorScheme(
@leighajarett
leighajarett / main.dart
Created November 17, 2023 20:25
Slider with TabBar
import 'package:flutter/material.dart';
void main() => runApp(MyApp());
// More netural / iOS friendly theme
final ColorScheme iosColorScheme = ColorScheme(
brightness: Brightness.light,
primary: Color(0xFF007AFF), // iOS blue
onPrimary: Colors.white, // Text color on primary color (typically white)
secondary: Color(0xFFF8F8F8), // Lighter blue for secondary elements
@leighajarett
leighajarett / main.dart
Last active November 17, 2023 20:03
Animated icons in nested nav tab bar
import 'package:flutter/material.dart';
void main() => runApp(MyApp());
// More netural / iOS friendly theme
final ColorScheme iosColorScheme = ColorScheme(
brightness: Brightness.light,
primary: Color(0xFF007AFF), // iOS blue
onPrimary: Colors.white, // Text color on primary color (typically white)
secondary: Color(0xFFF8F8F8), // Lighter blue for secondary elements
@leighajarett
leighajarett / main.dart
Last active November 17, 2023 19:30
Nested Navigators in Tab Bar
import 'package:flutter/material.dart';
void main() => runApp(MyApp());
// More netural / iOS friendly theme
final ColorScheme iosColorScheme = ColorScheme(
brightness: Brightness.light,
primary: Color(0xFF007AFF), // iOS blue
onPrimary: Colors.white, // Text color on primary color (typically white)
secondary: Color(0xFFF8F8F8), // Lighter blue for secondary elements
@leighajarett
leighajarett / main.dart
Created November 16, 2023 18:55
Nested navigators
import 'package:flutter/material.dart';
void main() => runApp(MyApp());
// MyApp is the root widget of the application.
class MyApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
return MaterialApp(
home: Root(),
@leighajarett
leighajarett / main.dart
Created November 16, 2023 18:32
Scales icons for NavigationBar
import 'package:flutter/material.dart';
void main() => runApp(MyApp());
class MyApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
return MaterialApp(
home: MyHomePage(),
);
@leighajarett
leighajarett / main.dart
Created November 16, 2023 18:19
Icon scales in BottomNavigationBar
import 'package:flutter/material.dart';
void main() => runApp(MyApp());
class MyApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
return MaterialApp(
home: MyHomePage(),
);
@leighajarett
leighajarett / main.dart
Last active June 16, 2023 20:51
Reorderable list example
import 'package:flutter/material.dart';
/// Flutter code sample for [ReorderableListView].
void main() {
runApp(const ReorderableApp());
}
class ReorderableApp extends StatelessWidget {
const ReorderableApp({super.key});