flutter_intro 3.0.0-dev.1 flutter_intro: ^3.0.0-dev.1 copied to clipboard
A better way for new feature introduction and step-by-step users guide for your Flutter project.
import 'package:flutter/material.dart';
import 'package:flutter_intro/flutter_intro.dart';
import 'package:intro/future_guide_page.dart';
void main() {
runApp(const MyApp());
}
class MyApp extends StatelessWidget {
const MyApp({Key? key}) : super(key: key);
@override
Widget build(BuildContext context) {
return Intro(
child: MaterialApp(
theme: ThemeData(
primarySwatch: Colors.blue,
visualDensity: VisualDensity.adaptivePlatformDensity,
),
home: const StartPage(),
),
);
}
}
class StartPage extends StatelessWidget {
const StartPage({Key? key}) : super(key: key);
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
title: const Text('Flutter Intro'),
),
body: Center(
child: Column(
mainAxisSize: MainAxisSize.min,
children: [
ElevatedButton(
child: const Text('Work with FutureBuilder'),
onPressed: () {
Navigator.push(
context,
MaterialPageRoute(
builder: (BuildContext context) => const FutureGuidePage(),
),
);
},
),
],
),
),
);
}
}