Github stars Pub Version

Crow gives you utils widgets, to apply separation of concerns.


  1. Add this to your packages pubspec.yaml file:
  crow: <^last>
  1. Install it You can install it from the command line:
$ flutter pub get
  1. Import it Now in Dart code, you can use:
import 'package:crow/crow.dart';


contracts (interfaces)

  • data layer
    • Model
    • RemoteDataSource
    • LocalDataSource
  • domain layer
    • Entity
    • Service
    • UseCase
  • presentation layer
    • middleware
    • page
    • screen
    • view
    • view_model
  • generic
    • crud_operation
    • params
    • repository


  • connectivity_service
  • preferences_service
  • theme_mode_service


There are two types of Widgets:

  1. View - The StatelessWidget implementation but with extra features.
  2. Screen - The responsive version of View, which offers more utils. You will find only View examples, but Screen are the same except they have more method for the build. Like: phone(), tablet() etc.


  1. First of all At the top of your main method you need to call Crow initDependencies, which will allows you getting benefits of preregistered dependencies.
  2. Define your View.
  3. If you need custom viewModel then set the View generic type to the ViewModel which you have been created.
  4. Register your ViewModel as a dependency.
  5. Enjoy crow!.
void main() async {
  await Crow.instance.initAsyncServices();
  Get.lazyPut<HomeViewModel>(; // Or
  // Get.lazyPut<HomeViewModel>(() => HomeViewModel()); same thing.

// Remember to set the View generic `Type` in order to accesses your custom properties,
// getters, setters, methods in your Widget. As below HomeViewModel is subclass of ViewModel.
// If you don't specify the View generic `Type` then you'll be able to accesses only predefined stuff. e.g a context getter. 
class HomeView extends View<HomeViewModel> {
  const HomeView({Key? key}) : super(key: key);

  // Note: that you can assess the BuildContext globally in your widget.
  Widget? builder() {
    return Scaffold(
      appBar: AppBar(
        title: Text(viewModel.title),
      body: Center(
        child: ElevatedButton(
          onPressed: viewModel.navToNext, // Your custom method.
          child: const Text('Go Next'),

class HomeViewModel extends ViewModel {
  final String title = 'flutter_crow';

  void navToNext() {
      context, // You can accesses the BuildContext globally in your ViewModel.
        builder: (context) {
          return const SecondPage();

// Remember what we have side?
// The type parameter on View is optional, so in this case you cannot access custom invocation,
// but still able to get the predefined ones like the global context.
class SecondPage extends View {
  const SecondPage({Key? key}) : super(key: key);

  Widget builder() {
    return const Scaffold(
      body: Center(
        child: Text('Go back'),


Crow gives you util widgets interfaces to apply separation of concerns.