fastyle_connectivity 0.0.9 fastyle_connectivity: ^0.0.9 copied to clipboard
Set of connectivity Widgets for the fastyle library.
// Flutter imports:
import 'package:flutter/material.dart';
// Package imports:
import 'package:fastyle_connectivity/fastyle_connectivity.dart';
import 'package:fastyle_core/fastyle_core.dart';
void main() {
runApp(const MyApp());
}
class MyApp extends StatelessWidget {
const MyApp({super.key});
// This widget is the root of your application.
@override
Widget build(BuildContext context) {
return FastApp(
homeBuilder: (_) => 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
Widget build(BuildContext context) {
return const FastSectionPage(
titleText: 'Fast Connectivity Example',
child: Center(
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
children: <Widget>[
FastConnectivityStatusListener(
showDescription: true,
),
],
),
),
// This trailing comma makes auto-formatting nicer for build methods.
);
}
}