GETX BASE CLASSES
A set of base classes for GetX projects in Flutter.
To use this package, add getx_base_classes
to your dependencies in your pubspec.yaml
file:
dependencies:
getx_base_classes: ^1.0.0
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.
Now in your Dart code, you can use:
import 'package:getx_base_classes/getx_base_classes.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