s_packages 1.2.5 copy "s_packages: ^1.2.5" to clipboard
s_packages: ^1.2.5 copied to clipboard

A unified package gathering multiple widgets and tools.

example/lib/main.dart

import 'dart:ui';

import 'package:s_packages/s_packages.dart';

import 'screens/home_screen.dart';

void main() {
  runApp(const SPackagesExampleApp());
}

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

  @override
  Widget build(BuildContext context) {
    return ForcePhoneSizeOnWeb(
      child: MaterialApp(
        title: 'S Packages Examples',
        debugShowCheckedModeBanner: false,
        theme: ThemeData(
          colorScheme: ColorScheme.fromSeed(
            seedColor: Colors.deepPurple,
            brightness: Brightness.light,
          ),
          useMaterial3: true,
          appBarTheme: const AppBarTheme(
            centerTitle: true,
            systemOverlayStyle: SystemUiOverlayStyle.light,
          ),
        ),
        //https://stackoverflow.com/questions/69232764/flutter-web-cannot-scroll-with-mouse-down-drag-flutter-2-5
        scrollBehavior: const MaterialScrollBehavior().copyWith(
          physics: const BouncingScrollPhysics(),
          scrollbars: true,
          dragDevices: {
            PointerDeviceKind.mouse,
            PointerDeviceKind.touch,
            PointerDeviceKind.stylus,
            PointerDeviceKind.unknown,
            PointerDeviceKind.trackpad
          },
        ),
        darkTheme: ThemeData(
          colorScheme: ColorScheme.fromSeed(
            seedColor: Colors.deepPurple,
            brightness: Brightness.light,
          ),
          useMaterial3: true,
          appBarTheme: const AppBarTheme(centerTitle: true),
        ),
        themeMode: ThemeMode.system,
        home: const HomeScreen(),
        builder: (context, child) => Modal.appBuilder(
          context,
          child,
          backgroundColor: Colors.black,
          borderRadius: BorderRadius.circular(24),
        ),
      ),
    );
  }
}