first_open_slideshow 0.0.3 first_open_slideshow: ^0.0.3 copied to clipboard
Display a slideshow on first open
import 'package:first_open_slideshow/first_open_slideshow.dart';
import 'package:first_open_slideshow/first_open_slideshow_frame.dart';
import 'package:flutter/material.dart';
void main() {
runApp(MyApp());
}
class MyApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
return MaterialApp(
home: Scaffold(
body: Slideshow(
stringForNext: "Next",
slideShowItems: <PageItem>[
testPageItem1(context),
testPageItem2(context),
testPageItem3(context),
],
whenFinished: Text("Finished"),
),
),
);
}
}
PageItem testPageItem1(BuildContext context) => PageItem(
titleText: "Title1",
buttonText: "Button",
icon: Icon(Icons.text_fields),
captionWidget: Container(
width: 250,
height: 250,
color: Colors.yellow,
),
);
PageItem testPageItem2(BuildContext context) => PageItem(
titleText: "Title2",
buttonText: "Button",
icon: Icon(Icons.add),
captionWidget: Container(
width: 250,
height: 250,
color: Colors.green,
),
);
PageItem testPageItem3(BuildContext context) => PageItem(
titleText: "Title3",
buttonText: "Button",
icon: Icon(Icons.dashboard),
captionWidget: Container(
width: 250,
height: 250,
color: Colors.black,
),
);