Skip to content

Commit

Permalink
Added OxygenPostCard
Browse files Browse the repository at this point in the history
  • Loading branch information
niloysikdar committed May 1, 2021
1 parent 641e7ac commit 456e09c
Show file tree
Hide file tree
Showing 3 changed files with 82 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
import 'package:google_fonts/google_fonts.dart';
import 'package:plaso_connect/constants/colors.dart';
import 'package:plaso_connect/screens/addoxygen.dart';
import 'package:plaso_connect/screens/showOxygenposts.dart';

Future<void> main() async {
WidgetsFlutterBinding.ensureInitialized();
Expand All @@ -30,7 +30,7 @@ class MyApp extends StatelessWidget {
primaryColor: kelectronBlue,
iconTheme: IconThemeData(color: kelectronBlue),
),
home: AddOxygenDetails(),
home: ShowOxygenPosts(),
);
}
}
73 changes: 73 additions & 0 deletions lib/screens/showOxygenposts.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
import 'package:flutter/material.dart';
import 'package:plaso_connect/constants/colors.dart';
import 'package:plaso_connect/widgets/boxdecoration.dart';

class ShowOxygenPosts extends StatelessWidget {
@override
Widget build(BuildContext context) {
Size size = MediaQuery.of(context).size;
return SafeArea(
child: Scaffold(
body: Column(
children: [
Container(
margin: EdgeInsets.all(20),
padding: EdgeInsets.all(20),
decoration: newboxDecoration(),
width: size.width,
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(
"This is a title",
style: TextStyle(
color: kelectronBlue,
fontSize: 22,
fontWeight: FontWeight.w600,
),
),
SizedBox(height: 3),
Text(
"This is a description",
style: TextStyle(
color: kelectronBlue,
fontSize: 20,
fontWeight: FontWeight.w500,
),
),
SizedBox(height: 3),
Text(
"Area PIN: 733202",
style: TextStyle(
color: kelectronBlue,
fontSize: 18,
fontWeight: FontWeight.w500,
),
),
SizedBox(height: 3),
Text(
"30/07/2001 -by Admin",
style: TextStyle(
color: Colors.grey[800],
fontSize: 18,
fontWeight: FontWeight.w500,
),
),
SizedBox(height: 3),
Text(
"Role: Admin",
style: TextStyle(
color: Colors.grey[800],
fontSize: 18,
fontWeight: FontWeight.w500,
),
),
],
),
),
],
),
),
);
}
}
7 changes: 7 additions & 0 deletions lib/services/database.dart
Original file line number Diff line number Diff line change
Expand Up @@ -34,4 +34,11 @@ class DatabaseMethod {
print(e.toString());
}
}

Stream<QuerySnapshot> getOxygen({required String pin}) {
return db
.collection("oxygenPosts")
.where("pin", isEqualTo: pin)
.snapshots();
}
}

0 comments on commit 456e09c

Please sign in to comment.