Skip to content

Instantly share code, notes, and snippets.

@carzacc
Created February 9, 2019 21:23
Show Gist options
  • Save carzacc/df0e2caf283bfd8e15cffd864e23fa09 to your computer and use it in GitHub Desktop.
Save carzacc/df0e2caf283bfd8e15cffd864e23fa09 to your computer and use it in GitHub Desktop.
image_picker guide
class PictureShowcaseHome extends StatefulWidget {
final String title;
PictureShowcaseHome(this.title);
_HomePageState createState() => _HomePageState();
}
class _HomePageState extends State<PictureShowcaseHome> {
List<Image> imgs = [];
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(title: Text(widget.title)),
body: ListView.builder(
itemCount: imgs.length,
itemBuilder: (context, i) =>
Column(
children: [
imgs[i],
Divider()
]
),
),
floatingActionButton: FloatingActionButton(
child: Icon(Icons.add),
onPressed: () {
return;
}
),
);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment