Skip to content

Instantly share code, notes, and snippets.

@acodeb
acodeb / main.dart
Created April 11, 2019 01:35
Flutter: Change RaisedButton color dynamically in onPressed function
import 'package:flutter/material.dart';
void main() => runApp(MyApp());
class MyApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
return MaterialApp(
title: 'Flutter Demo',
theme: ThemeData(
@acodeb
acodeb / main.dart
Created March 16, 2018 16:14
Flutter: Buttons inside ListView. Button onPressed will change the color of the button
import 'package:flutter/material.dart';
void main() => runApp(
new MaterialApp(home: new MyApp())
);
class MyApp extends StatefulWidget {
@override
_MyAppState createState() => new _MyAppState();
}