xb_scaffold 0.0.59 copy "xb_scaffold: ^0.0.59" to clipboard
xb_scaffold: ^0.0.59 copied to clipboard

基于provider封装的脚手架.

example/lib/main.dart

import 'package:example/xb_widget_test.dart';
import 'package:flutter/material.dart';
import 'package:xb_scaffold/xb_scaffold.dart';

void main() async {
  runApp(const MyApp());
}

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

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'Flutter Demo',
      theme: ThemeData(
        colorScheme: ColorScheme.fromSeed(seedColor: Colors.deepPurple),
        useMaterial3: true,
      ),
      navigatorObservers: [navigatorObserver],
      home: XBScaffold(
          imgPrefixs: const ["assets/images/default/", "assets/images/custom/"],
          // loadingBuilder: (context) {
          //   return Center(
          //     child: Container(
          //       height: 100,
          //       width: 100,
          //       color: Colors.red,
          //     ),
          //   );
          // },
          child: const MyHomePage(title: 'Flutter Demo Home Page')),
    );
  }
}

class MyHomePage extends StatefulWidget {
  const MyHomePage({super.key, required this.title});

  final String title;

  @override
  State<MyHomePage> createState() => _MyHomePageState();
}

class _MyHomePageState extends State<MyHomePage> {
  @override
  void initState() {
    super.initState();
    stackStream.listen((event) {
      print("栈发生改变");
    });
  }

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        backgroundColor: Theme.of(context).colorScheme.inversePrimary,
        title: Text(widget.title),
      ),
      body: const XBWidgetTest(),
    );
  }
}
3
likes
0
points
2.11k
downloads

Publisher

unverified uploader

Weekly Downloads

基于provider封装的脚手架.

Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

cached_network_image, flutter, provider

More

Packages that depend on xb_scaffold