get_x_master 0.0.24 copy "get_x_master: ^0.0.24" to clipboard
get_x_master: ^0.0.24 copied to clipboard

Independent Flutter state management, routing, and DI solution inspired by GetX with high performance.

example/lib/main.dart

import 'package:example/reactive_get_view_demo.dart';
import 'package:example/test_expandable_bottomsheet.dart';
import 'package:flutter/material.dart';
import 'package:get_x_master/get_x_master.dart';
/*
void main() {
  runApp(const MyApp());
}

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

  // This widget is the root of your application.
  @override
  Widget build(BuildContext context) {
    return GetMaterialApp(
      title: 'Flutter Demo',
      debugShowCheckedModeBanner: false,
      initialBinding: MyBinding(),
      theme: ThemeData(
        primarySwatch: Colors.blue,
        visualDensity: VisualDensity.adaptivePlatformDensity,
      ),
      home: const Screen(),
    );
  }
}

*/

void main() async {
  WidgetsFlutterBinding.ensureInitialized();

  // Initialize CounterController before running the app
  Get.put(CounterController());

  runApp(const GetMaterialApp(home: TestExpandableBottomSheet()));
}

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

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      body: SizedBox(
        width: context.width,
        height: context.height,
        child: Column(
          mainAxisAlignment: MainAxisAlignment.center,
          crossAxisAlignment: CrossAxisAlignment.center,
          spacing: 25,
          children: [
            ElevatedButton(
              child: Text("snackbar"),
              onPressed: () {
                Get.snackbar("title", "message",
                    snackPosition: SnackPosition.bottom,
                    margin: EdgeInsets.all(15.0));
              },
            ),
            ElevatedButton(
              child: Text("showSnackbar"),
              onPressed: () {
                Get.showSnackbar(GetSnackBar(
                  title: "title",
                  message: "message",
                  backgroundColor: Colors.amber,
                  margin: EdgeInsets.all(15.0),
                  duration: Duration(seconds: 2),
                  snackPosition: SnackPosition.top,
                ));
              },
            ),
            ElevatedButton(
              child: Text("bottomSheet"),
              onPressed: () {
                Get.bottomSheet(
                  Container(
                    height: 200,
                    width: double.infinity,
                    color: Colors.red,
                  ),
                );
              },
            ),
            ElevatedButton(
              child: Text("defaultDialog"),
              onPressed: () {
                Get.defaultDialog(
                  title: "title",
                  content: Text("content"),
                );
              },
            )
          ],
        ),
      ),
    );
  }
}
9
likes
0
points
507
downloads

Publisher

verified publisherswanflutterdev.com

Weekly Downloads

Independent Flutter state management, routing, and DI solution inspired by GetX with high performance.

Repository (GitHub)
View/report issues

Documentation

Documentation

License

unknown (license)

Dependencies

flutter, flutter_web_plugins, intl, shamsi_date, web

More

Packages that depend on get_x_master