flutter_prompt 0.0.1 copy "flutter_prompt: ^0.0.1" to clipboard
flutter_prompt: ^0.0.1 copied to clipboard

A lightweight prompt library, including: toast, loading, EasyLoading,bubbles, etc. 一个轻巧的提示库,包含有:吐司、加载、气泡等。

example/lib/main.dart

import 'package:flutter/material.dart';
import 'package:flutter_prompt/flutter_prompt.dart';
import 'package:flutter_prompt_example/custom_style.dart';
import 'package:flutter_prompt_example/home.dart';

void main() {
  runApp(const 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 MaterialApp(
      theme: ThemeData(
        useMaterial3: true,
        elevatedButtonTheme: ElevatedButtonThemeData(
          style: ButtonStyle(
            textStyle: MaterialStateProperty.all(
              const TextStyle(color: Colors.white, fontSize: 10),
            ),
            backgroundColor: MaterialStateProperty.resolveWith(
              (states) => switch (states) {
                MaterialState.disabled => Colors.grey,
                MaterialState.selected => Colors.green,
                MaterialState.pressed => Colors.yellow,
                _ => Colors.blue,
              },
            ),
          ),
        ),
      ),
      home: Prompt.initRoot(
        child: const Home(),
        style: MyCustomStyle()
      ),
    );
  }
}
2
likes
0
points
28
downloads

Publisher

unverified uploader

Weekly Downloads

A lightweight prompt library, including: toast, loading, EasyLoading,bubbles, etc. 一个轻巧的提示库,包含有:吐司、加载、气泡等。

Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

flutter, flutter_web_plugins, plugin_platform_interface

More

Packages that depend on flutter_prompt