gluestack_ui 0.0.1-alpha.5 copy "gluestack_ui: ^0.0.1-alpha.5" to clipboard
gluestack_ui: ^0.0.1-alpha.5 copied to clipboard

A universal UI library that provides optionally styled and accessible widgets, designed for easy integration into applications developed with Flutter.

example/lib/main.dart

import 'package:flutter/material.dart';
import 'package:flutter_riverpod/flutter_riverpod.dart';
import 'package:gluestack_ui/gluestack_ui.dart';
// import 'package:gluestack_ui_example/custom_config.dart';
import 'package:gluestack_ui_example/providers/theme_provider/theme_provider.dart';
import 'package:gluestack_ui_example/routes/router.dart';

void main() {
  runApp(const ProviderScope(child: MyApp()));
}

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

  @override
  State<MyApp> createState() => _MyAppState();
}

class _MyAppState extends State<MyApp> {
  @override
  Widget build(BuildContext context) {
    return GluestackProvider(
      // This is how we can provide custom configuration to Gluestack Theme.
      // gluestackCustomConfig: GluestackCustomConfig(
      //   button: customButton,
      //   buttonText: customButtonText,
      // ),
      child: Consumer(
        builder: (context, ref, child) {
          final currentThemeMode = ref.watch(toggleThemeProvider);

          return MaterialApp.router(
            routerConfig: router,
            themeMode: currentThemeMode,
            theme: ThemeData(
                colorSchemeSeed: Colors.deepPurple,
                useMaterial3: true,
                brightness: Brightness.light,
                appBarTheme:
                    Theme.of(context).appBarTheme.copyWith(elevation: 4.0)),
            darkTheme: ThemeData(
                colorSchemeSeed: Colors.deepPurple,
                useMaterial3: true,
                brightness: Brightness.dark,
                appBarTheme:
                    Theme.of(context).appBarTheme.copyWith(elevation: 4.0)),
          );
        },
      ),
    );
  }
}
14
likes
0
pub points
65%
popularity

Publisher

verified publishergeekyants.com

A universal UI library that provides optionally styled and accessible widgets, designed for easy integration into applications developed with Flutter.

Homepage
Repository (GitHub)
View/report issues

Topics

#ui #widget #design-system #ui-library

Documentation

Documentation

License

unknown (license)

Dependencies

flutter, fluttertoast, get_it, url_launcher

More

Packages that depend on gluestack_ui