Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class Child2PageState extends State<Child2Page> {
- String value = "Page 2";
- @override
- Widget build(BuildContext context) {
- final currentValue = ParentProvider.of(context).title;
- return Padding(
- padding: const EdgeInsets.all(15.0),
- child: Column(
- children: [
- Text(
- currentValue ?? value,
- style: Theme.of(context).primaryTextTheme.headline,
- ),
- ],
- ),
- );
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement