mirror of
https://github.com/flutter/flutter.git
synced 2026-02-20 02:29:02 +08:00
Merge pull request #1377 from Hixie/rebuild
Require giving a GlobalKey to UniqueComponent
This commit is contained in:
commit
e601015bff
@ -5,7 +5,9 @@
|
||||
import 'package:sky/src/fn3.dart';
|
||||
|
||||
abstract class UniqueComponent<T extends State> extends StatefulComponent {
|
||||
UniqueComponent({ GlobalKey key }) : super(key: key ?? new GlobalKey());
|
||||
UniqueComponent({ GlobalKey key }) : super(key: key) {
|
||||
assert(key != null);
|
||||
}
|
||||
|
||||
T createState();
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user