Skip to content

Instantly share code, notes, and snippets.

View leighajarett's full-sized avatar

Leigha Reid (Jarett) leighajarett

View GitHub Profile
@leighajarett
leighajarett / main.dart
Created November 7, 2022 22:47
Flutter styling button example
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
void main() {
runApp(
const App(),
);
}
class App extends StatelessWidget {
@leighajarett
leighajarett / healthkit_bindings.dart
Created November 16, 2022 18:17
Healthkit bindings
This file has been truncated, but you can view the full file.
// AUTO GENERATED FILE, DO NOT EDIT.
//
// Generated by `package:ffigen`.
import 'dart:ffi' as ffi;
import 'package:ffi/ffi.dart' as pkg_ffi;
/// Create bindings for the HealthKit APIs
class HealthKit {
/// Holds the symbol lookup function.
final ffi.Pointer<T> Function<T extends ffi.NativeType>(String symbolName)
@leighajarett
leighajarett / main.dart
Created February 27, 2023 18:25
flutter_start
import 'package:english_words/english_words.dart';
import 'package:flutter/material.dart';
import 'package:provider/provider.dart';
void main() {
runApp(MyApp());
}
class MyApp extends StatelessWidget {
const MyApp({super.key});
@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});
@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
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: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
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
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
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