ઇન્સ્ટોલેશન
Add the package, then move navigation and overlays into explicit state. Keep imperative push/pop out of the same stack.
એકલ નિર્ભરતા
Install with one pub command. No code generation setup is required.
સ્થિતિ-પ્રથમ API
You control a List<PageEntry> and optional OverlayRequest as pure state.
ક્રમશઃ અપનાવ
એક feature flow થી શરૂઆત કરો અને screen by screen migration કરો.
ઇન્સ્ટોલ અને પ્રારંભ કરો
pub add નો ઉપયોગ કરો, પછી pages અને overlay માટે પ્રારંભિક root state જોડો.
કમાન્ડ
પ્રારંભિક એપ state
import 'package:declarative_nav/declarative_nav.dart';
class _AppRootState extends State<AppRoot> {
OverlayRequest? _overlay;
late List<PageEntry> _pages;
@override
void initState() {
super.initState();
_pages = const [
PageEntry(key: 'home', name: '/home'),
];
}
}
મર્યાદા
એક stack ની અંદર, PageEntry.key અનન્ય જ રહેવું જોઈએ કારણ કે તે Navigator page identity બની જાય છે.
પાછળ
Introduction