qlevar_view_model 0.0.1 copy "qlevar_view_model: ^0.0.1" to clipboard
qlevar_view_model: ^0.0.1 copied to clipboard

An extension to qlevar_router package which gives ability to use ViewModels that will be bind to a particular page for holding its business logic.

example/lib/main.dart

import 'package:flutter/material.dart';
import 'package:qlevar_router/qlevar_router.dart';

import 'routes/app_routes.dart';

void main() {
  runApp(const MyApp());
}

class MyApp extends StatelessWidget {
  const MyApp({super.key});

  @override
  Widget build(BuildContext context) {
    final appRoutes = AppRoutes();
    appRoutes.setup();
    final routerDelegate = QRouterDelegate(
      appRoutes.routes,
      initPath: '/sign-in',
    );
    return MaterialApp.router(
      routeInformationParser: const QRouteInformationParser(),
      routerDelegate: routerDelegate,
      theme: ThemeData.dark(),
    );
  }
}
1
likes
160
points
22
downloads

Publisher

verified publisherqlevar.de

Weekly Downloads

An extension to qlevar_router package which gives ability to use ViewModels that will be bind to a particular page for holding its business logic.

Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (license)

Dependencies

flutter, qlevar_router

More

Packages that depend on qlevar_view_model