Skip to content

Instantly share code, notes, and snippets.

View rydmike's full-sized avatar

Rydmike rydmike

View GitHub Profile
@rydmike
rydmike / main.dart
Last active October 7, 2024 20:05
Flutter BubbleTabs example
import 'package:flutter/material.dart';
// Flutter code sample for [BubbleTabs].
//
// Available as gist:
// https://gist.github.com/rydmike/f77c8ff139f13c9d0e7a231c69cb375b
// And DartPad:
// https://dartpad.dev/?id=f77c8ff139f13c9d0e7a231c69cb375b
// Related to this tweet:
// https://x.com/RydMike/status/1843380238258184605
@rydmike
rydmike / main.dart
Created October 6, 2024 11:48
Gist to test and show MenuItemButton push to new screen
import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
/// Flutter code sample for [MenuBar].
void main() => runApp(const MenuBarApp());
/// A class for consolidating the definition of menu entries.
///
/// This sort of class is not required, but illustrates one way that defining
@rydmike
rydmike / main.dart
Last active June 9, 2024 06:30
Flutter example on how to show hide animate a button next to a text field
import 'package:flutter/material.dart';
void main() {
runApp(const MyApp());
}
class MyApp extends StatelessWidget {
const MyApp({super.key});
@override
@rydmike
rydmike / main.dart
Created November 8, 2023 15:49
Test of shadow issue on PageView using elevated Card with ContinuousRectangleBorder wrappers
import 'dart:ui';
import 'package:flutter/material.dart';
void main() {
runApp(const MyApp());
}
class MyApp extends StatelessWidget {
const MyApp({super.key});
@rydmike
rydmike / main.dart
Created November 8, 2023 15:07
Test of shadow issue on PageView using elevated Card wrappers
import 'dart:ui';
import 'package:flutter/material.dart';
void main() {
runApp(const MyApp());
}
class MyApp extends StatelessWidget {
const MyApp({super.key});
@rydmike
rydmike / main.dart
Last active October 22, 2023 19:19
BottomSheet with handle test and transparent Card shadow theme in dark mode
import 'package:flutter/material.dart';
void main() => runApp(const MyApp());
class MyApp extends StatelessWidget {
const MyApp({super.key});
@override
Widget build(BuildContext context) {
return MaterialApp(
@rydmike
rydmike / main.dart
Created September 6, 2023 11:52
Form with Checkbox sample
import 'package:flutter/material.dart';
void main() => runApp(const FormExampleApp());
class FormExampleApp extends StatelessWidget {
const FormExampleApp({super.key});
@override
Widget build(BuildContext context) {
return MaterialApp(
@rydmike
rydmike / main.dart
Created August 10, 2023 11:15
Card elevation example for Flutter issue #132199 https://github.com/flutter/flutter/issues/132199
// MIT License
//
// Copyright (c) 2023 Mike Rydstrom
//
// 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
// furnished to do so, subject to the following conditions:
@rydmike
rydmike / main.dart
Created January 17, 2023 15:03
Button Theming Demo - Requires Flutter 3.7.0 beta or later
// MIT License
//
// Copyright (c) 2023 Mike Rydstrom
//
// 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
// furnished to do so, subject to the following conditions:
@rydmike
rydmike / main.dart
Last active November 15, 2022 14:29
Four Material 3 Chip Issues: 1) Ink 2) Elevation 3) Disabled ChoiceChip 4) Cannot make M3 compliant theme (Issue #115364)
// MIT License
//
// Copyright (c) 2022 Mike Rydstrom
//
// 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
// furnished to do so, subject to the following conditions: