Skip to content

Instantly share code, notes, and snippets.

// Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
/// Example of setting app TextButton style/theme from MaterialApp
/// theme & themeDark
import 'package:flutter/material.dart';
const blue = Colors.blue;
@ben-xx
ben-xx / main.dart
Last active April 9, 2024 07:30
stateful theme switcher
/// gist for https://stackoverflow.com/a/67714404/2301224
import 'package:flutter/material.dart';
void main() {
runApp(MyApp());
}
class MyApp extends StatefulWidget {
@override
_MyAppState createState() => _MyAppState();