adding packages
This commit is contained in:
@@ -0,0 +1,20 @@
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
import 'feature.dart';
|
||||
|
||||
class Features extends InheritedWidget {
|
||||
const Features({
|
||||
Key? key,
|
||||
required this.items,
|
||||
required Widget child,
|
||||
}) : super(key: key, child: child);
|
||||
|
||||
final List<Feature> items;
|
||||
|
||||
static Features? of(BuildContext context) {
|
||||
return context.dependOnInheritedWidgetOfExactType<Features>();
|
||||
}
|
||||
|
||||
@override
|
||||
bool updateShouldNotify(Features old) => items != old.items;
|
||||
}
|
||||
Reference in New Issue
Block a user