Skip to main content

santo_ui 1.0.0 copy "santo_ui: ^1.0.0" to clipboard
santo_ui: ^1.0.0 copied to clipboard

retracted

企业级 Flutter 组件库,提供丰富的移动端 UI 组件和交互组件。

example/lib/main.dart

import 'package:santo_ui/santo_ui.dart';
import 'sample/l10n/l10n.dart';
import 'package:example/sample/components/layout/app_layout_example.dart';
import 'package:example/sample/home/home.dart';
import 'package:flutter/material.dart';
import 'package:flutter_localizations/flutter_localizations.dart';

void main() {
  SantoIntl.add(ResourceDe.locale, ResourceDe());
  // 全局导航栏使用炭灰深色背景
  SantoThemeConfigurator.instance.register(
    SantoAllThemeConfig(appBarConfig: SantoAppBarConfig.dark()),
  );
  runApp(MyApp());
}

class MyApp extends StatefulWidget {
  @override
  _MyAppState createState() => _MyAppState();
}

class _MyAppState extends State<MyApp> {
  @override
  Widget build(BuildContext context) {
    return NotificationListener<ChangeLocalEvent>(
      onNotification: (_) {
        setState(() {});
        return true;
      },
      child: MaterialApp(
        debugShowCheckedModeBanner: false,
        locale: ChangeLocalEvent.locale,
        localizationsDelegates: [
          GlobalMaterialLocalizations.delegate,
          GlobalWidgetsLocalizations.delegate,
          GlobalCupertinoLocalizations.delegate,
          SantoLocalizationDelegate.delegate,
        ],
        supportedLocales: [
          Locale('en', 'US'),
          Locale('zh', 'CN'),
          Locale('de', 'DE'),
        ],
        title: 'Flutter Example',
        // AppLayout 示例「更多」菜单的页面地址
        routes: {
          AppLayoutDemoRoutes.notice: (_) =>
              const AppLayoutDemoRoutePage(title: '通知'),
          AppLayoutDemoRoutes.schedule: (_) =>
              const AppLayoutDemoRoutePage(title: '日程'),
          AppLayoutDemoRoutes.report: (_) =>
              const AppLayoutDemoRoutePage(title: '报表'),
        },
        theme: ThemeData(
          primarySwatch: Colors.blue,
          scaffoldBackgroundColor: const Color(0xFFF5F6FA),
        ),
        home: HomePage(),
      ),
    );
  }
}
1
likes
0
points
1.01k
downloads

Documentation

Documentation

Publisher

unverified uploader

Weekly Downloads

企业级 Flutter 组件库,提供丰富的移动端 UI 组件和交互组件。

Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

bindings_compatible, flutter, intl, lpinyin, path_drawing, photo_view, xml

More

Packages that depend on santo_ui