Skip to content

Instantly share code, notes, and snippets.

Avatar

Rydmike rydmike

View GitHub Profile
@rydmike
rydmike / main.dart
Created Jun 23, 2022
Flutter example of themed TextField with different state depending background color
View main.dart
// 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:
@rydmike
rydmike / main.dart
Last active May 19, 2022
Flutter Nordic Roads to ThemeData talk
View main.dart
// 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:
@rydmike
rydmike / main.dart
Created May 15, 2022
Flutter Typography Toggle Assert Issue
View main.dart
import 'package:flutter/foundation.dart';
import 'package:flutter/material.dart';
void main() {
runApp(const MyApp());
}
class MyApp extends StatefulWidget {
const MyApp({super.key});
@override
@rydmike
rydmike / main.dart
Created May 13, 2022
Flutter 3.0 NOT removed buttons!
View main.dart
import 'package:flutter/material.dart';
const Color darkBlue = Color.fromARGB(255, 18, 32, 47);
const Color lightCyan = Color(0xFF7DBBB2);
void main() {
runApp(const MyApp());
}
class MyApp extends StatelessWidget {
@rydmike
rydmike / main.dart
Last active Feb 19, 2022
Flutter width constrained body with app theming demo
View main.dart
// MIT License
//
// Copyright (c) 2021 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 Sep 9, 2021
Flutter Drag and Tap Re-order list, with "fake" up down animation effect... just an experiment
View main.dart
import 'package:flutter/material.dart';
void main() {
runApp(const MyApp());
}
class MyApp extends StatelessWidget {
const MyApp({Key? key}) : super(key: key);
// This widget is the root of your application.
View main.dart
import 'package:flutter/foundation.dart';
import 'package:flutter/material.dart';
void main() {
runApp(const MyApp());
}
class MyApp extends StatelessWidget {
const MyApp({Key? key}) : super(key: key);
@override
@rydmike
rydmike / main.dart
Last active Aug 30, 2021
None uniform borderside container hack example.
View main.dart
import 'package:flutter/material.dart';
void main() {
runApp(MyApp());
}
class MyApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
return MaterialApp(
@rydmike
rydmike / platform_is.dart
Last active Sep 24, 2021
Flutter Universal Platform Check - That Works on Web too
View platform_is.dart
import 'universal_platform_web.dart'
if (dart.library.io) 'universal_platform_vm.dart';
/// A universal platform checker.
///
/// Can be used to check active physical Flutter platform on all platforms.
///
/// To check what host platform the app is running on use:
///
/// * PlatformIs.android
@rydmike
rydmike / main.dart
Created Jun 2, 2021
Flutter: SelectableText has extra padding and does not align with Text
View main.dart
import 'package:flutter/material.dart';
void main() {
runApp(MyApp());
}
class MyApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
return MaterialApp(