Skip to content

Instantly share code, notes, and snippets.

@whataa
whataa / inherited_widget_test_2.dart
Last active Nov 29, 2019
一个使用InheritedWidget的建议范例
View inherited_widget_test_2.dart
import 'package:flutter/material.dart';
void main() {
runApp(MaterialApp(
home: Scaffold(
body: MyWidget(
Column(
children: <Widget>[
WidgetA(),
WidgetB()
@whataa
whataa / inherited_widget_test.dart
Last active Sep 15, 2019
一个使用InheritedWidget的错误范例
View inherited_widget_test.dart
import 'package:flutter/material.dart';
void main() {
runApp(MaterialApp(
home: Scaffold(
body: MyWidget(),
),
));
}