2022-06-22 19:39:23 +00:00
|
|
|
import 'package:flutter/material.dart';
|
|
|
|
import '25-addphotos1.dart';
|
|
|
|
|
|
|
|
class HomePage extends StatefulWidget {
|
|
|
|
@override
|
|
|
|
_HomePageState createState() => _HomePageState();
|
|
|
|
}
|
|
|
|
|
|
|
|
class _HomePageState extends State<HomePage> {
|
|
|
|
@override
|
|
|
|
Widget build(BuildContext context) {
|
|
|
|
return Scaffold(
|
2022-07-18 06:36:52 +00:00
|
|
|
appBar: AppBar(
|
|
|
|
title: Text('Home Page'),
|
|
|
|
),
|
2022-06-22 19:39:23 +00:00
|
|
|
floatingActionButton: FloatingActionButton(
|
|
|
|
child: Icon(Icons.add),
|
|
|
|
onPressed: () {
|
|
|
|
Navigator.of(context)
|
|
|
|
.push(MaterialPageRoute(builder: (context) => addphotos1()));
|
|
|
|
},
|
|
|
|
),
|
|
|
|
body: StreamBuilder(
|
|
|
|
builder: (context, snapshot) {
|
|
|
|
return !snapshot.hasData
|
|
|
|
? Center(
|
|
|
|
child: CircularProgressIndicator(),
|
|
|
|
)
|
|
|
|
: Container(
|
|
|
|
padding: EdgeInsets.all(4),
|
|
|
|
child: GridView.builder(
|
|
|
|
gridDelegate: SliverGridDelegateWithFixedCrossAxisCount(
|
|
|
|
crossAxisCount: 3),
|
|
|
|
itemBuilder: (context, index) {
|
|
|
|
return Container(
|
|
|
|
margin: EdgeInsets.all(3),
|
|
|
|
);
|
|
|
|
}),
|
|
|
|
);
|
|
|
|
},
|
|
|
|
),
|
|
|
|
);
|
|
|
|
}
|
|
|
|
}
|