A Set of Base Classes for GetX Projects in Flutter

GETX BASE CLASSES

A set of base classes for GetX projects in Flutter.

Features

  • BaseView: A base class for your views with GetX state management.
  • BaseController: A base class for your controllers managing business logic.
  • BaseConnect: A base class for handling connectivity and making API calls.

Getting Started

To use this package, add getx_base_classes to your dependencies in your pubspec.yaml file:

dependencies:
  getx_base_classes: ^1.0.0

Use this package as a library

Depend on it

Run this command:

With Flutter:

 $ flutter pub add getx_base_classes

This will add a line like this to your package's pubspec.yaml (and run an implicit flutter pub get):

dependencies:
  getx_base_classes: ^0.0.1

Alternatively, your editor might support flutter pub get. Check the docs for your editor to learn more.

Import it

Now in your Dart code, you can use:

import 'package:getx_base_classes/getx_base_classes.dart'; 

example/lib/main.dart

import 'package:example/helper/route.dart';
import 'package:flutter/material.dart';
import 'package:get/get_navigation/get_navigation.dart';

import 'init/app_env.dart';

void main() {
  AppEnviornment.init();
  runApp(const MyApp());
}

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

  // This widget is the root of your application.
  @override
  Widget build(BuildContext context) => GetMaterialApp(
        theme: ThemeData(
          colorScheme: ColorScheme.fromSeed(seedColor: Colors.deepPurple),
          useMaterial3: true,
        ),
        getPages: routes,
        initialRoute: homePageRoute,
      );
} 

Download details:

Author: VisalSuresh90

Source: https://github.com/VisalSuresh90/getx_base_classes

#flutter #getx 

A Set of Base Classes for GetX Projects in Flutter
2.70 GEEK