super_core 3.6.0 copy "super_core: ^3.6.0" to clipboard
super_core: ^3.6.0 copied to clipboard

Super Core — GeniusLink’s shared design-system foundation for the Super toolkit: super_auto_suggestion_box, super_form_field, super_map, super_table_field, super_tree, and super_tab_bar. Defines the v [...]

example/lib/main.dart

import 'package:flutter/material.dart';
import 'package:flutter_localizations/flutter_localizations.dart';
import 'package:super_core/super_core.dart';

import 'home_screen.dart';

void main() => runApp(const SuperCoreExampleApp());

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

  @override
  State<SuperCoreExampleApp> createState() => _SuperCoreExampleAppState();
}

class _SuperCoreExampleAppState extends State<SuperCoreExampleApp> {
  SuperPalette _palette = SuperPalette.bluePalette;
  ThemeMode _themeMode = ThemeMode.system;
  Locale _locale = const Locale('en');

  @override
  Widget build(BuildContext context) {
    final isArabic = _locale.languageCode == 'ar';
    final typography = SuperTextTheme(isArabic: isArabic);

    return MaterialApp(
      title: 'Super Core',
      debugShowCheckedModeBanner: false,
      locale: _locale,
      supportedLocales: const [Locale('en'), Locale('ar')],
      localizationsDelegates: GlobalMaterialLocalizations.delegates,
      themeMode: _themeMode,
      themeAnimationDuration: const Duration(milliseconds: 300),
      themeAnimationCurve: Curves.easeOutCubic,
      theme: SuperMaterialThemeData.light(
        palette: _palette,
        textTheme: typography,
        primaryTextTheme: typography,
      ),
      darkTheme: SuperMaterialThemeData.dark(
        palette: _palette,
        textTheme: typography,
        primaryTextTheme: typography,
      ),
      builder: (context, child) => SuperToastHost(
        child: child ?? const SizedBox.shrink(),
      ),
      home: HomeScreen(
        selectedPalette: _palette,
        themeMode: _themeMode,
        locale: _locale,
        onPaletteChanged: (palette) => setState(() => _palette = palette),
        onThemeModeChanged: (mode) => setState(() => _themeMode = mode),
        onLocaleChanged: (locale) => setState(() => _locale = locale),
      ),
    );
  }
}
0
likes
150
points
1.05k
downloads

Documentation

API reference

Publisher

unverified uploader

Weekly Downloads

Super Core — GeniusLink’s shared design-system foundation for the Super toolkit: super_auto_suggestion_box, super_form_field, super_map, super_table_field, super_tree, and super_tab_bar. Defines the visual source: six swappable SuperPalette schemes, Material 3 SuperMaterialThemeData, brand/semantic colors, three-face typography, 4px spacing, control/field sizes, radii, motion, light/dark SuperThemeData, intl-free formatters, and core widgets. Supports light/dark and LTR/RTL.

Homepage
Repository (GitHub)
View/report issues

Topics

#flutter #widget #design-system #theme #tokens

License

MIT (license)

Dependencies

flutter, flutter_syntax_view, google_fonts

More

Packages that depend on super_core