Beispiel #1
0
        public override bool updateShouldNotify(InheritedWidget _oldWidget)
        {
            ChipTheme oldWidget = _oldWidget as ChipTheme;

            return(this.data != oldWidget.data);
        }
Beispiel #2
0
        public override Widget wrap(BuildContext context, Widget child)
        {
            ChipTheme ancestorTheme = context.findAncestorWidgetOfExactType <ChipTheme>();

            return(ReferenceEquals(this, ancestorTheme) ? child : new ChipTheme(data: data, child: child));
        }
Beispiel #3
0
        public static ChipThemeData of(BuildContext context)
        {
            ChipTheme inheritedTheme = (ChipTheme)context.inheritFromWidgetOfExactType(typeof(ChipTheme));

            return(inheritedTheme?.data ?? Theme.of(context).chipTheme);
        }
Beispiel #4
0
        public static ChipThemeData of(BuildContext context)
        {
            ChipTheme inheritedTheme = (ChipTheme)context.dependOnInheritedWidgetOfExactType <ChipTheme>();

            return(inheritedTheme?.data ?? Theme.of(context).chipTheme);
        }