Skip to content

Commit

Permalink
Format widgets-1/ using proposed style rules.
Browse files Browse the repository at this point in the history
  • Loading branch information
munificent committed Aug 14, 2023
1 parent 44459cf commit b2d08f5
Show file tree
Hide file tree
Showing 40 changed files with 1,379 additions and 1,484 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -103,9 +103,8 @@ class _FavoriteNoteScreenState extends State<FavoriteNoteScreen> {
alignment: Alignment.topLeft,
child: SingleChildScrollView(
child: ConstrainedBox(
constraints: BoxConstraints(
minHeight: viewportConstraints.maxHeight,
),
constraints:
BoxConstraints(minHeight: viewportConstraints.maxHeight),
child: IntrinsicHeight(
child: Column(
children: <Widget>[
Expand All @@ -124,9 +123,7 @@ class _FavoriteNoteScreenState extends State<FavoriteNoteScreen> {
gameVideo(context),
gameScreenshotsSizedBox(),
gameScreenshots(),
SizedBox(
height: 50,
)
SizedBox(height: 50),
],
),
),
Expand Down Expand Up @@ -155,10 +152,10 @@ class _FavoriteNoteScreenState extends State<FavoriteNoteScreen> {
width: 400,
height: 500,
placeholder: (context, url) => Center(
child: CircularProgressIndicator(
backgroundColor: Colors.black,
),
),
child: CircularProgressIndicator(
backgroundColor: Colors.black,
),
),
errorWidget: (context, url, error) => new Icon(Icons.error),
imageUrl:
"https://images.igdb.com/igdb/image/upload/t_cover_big_2x/${widget.note.imageCoverId}.jpg",
Expand Down Expand Up @@ -210,13 +207,14 @@ class _FavoriteNoteScreenState extends State<FavoriteNoteScreen> {
tooltip: 'Share this game',
onPressed: () {
Share.share(
'Check out this game :) ${widget.note.name}');
'Check out this game :) ${widget.note.name}',
);
},
),
Text("Share"),
],
),
)
),
],
),
],
Expand Down Expand Up @@ -248,18 +246,15 @@ class _FavoriteNoteScreenState extends State<FavoriteNoteScreen> {
Padding(
padding: const EdgeInsets.all(8.0),
child: Column(
children: <Widget>[
checkPs4Platform(),
checkXboxPlatform(),
],
children: <Widget>[checkPs4Platform(), checkXboxPlatform()],
),
),
Padding(
padding: const EdgeInsets.all(8.0),
child: Column(
children: <Widget>[checkPCPlatform(), checkNintendoPlatform()],
),
)
),
],
),
);
Expand Down Expand Up @@ -296,13 +291,15 @@ class _FavoriteNoteScreenState extends State<FavoriteNoteScreen> {
width: MediaQuery.of(context).size.width,
height: 250,
placeholder: (context, url) => Center(
child: CircularProgressIndicator(
backgroundColor: Colors.white,
),
),
child: CircularProgressIndicator(
backgroundColor: Colors.white,
),
),
errorWidget: (context, url, error) => new Icon(Icons.error),
imageUrl: "https://images.igdb"
".com/igdb/image/upload/t_screenshot_med_2x/${_screenshots[index].imageId}.jpg",
".com/igdb/image/upload/t_screenshot_med_2x/${_screenshots[
index
].imageId}.jpg",
),
),
);
Expand All @@ -324,12 +321,7 @@ class _FavoriteNoteScreenState extends State<FavoriteNoteScreen> {
child: SizedBox(
height: 30,
child: Row(
children: <Widget>[
Text(
'* Genres',
style: TextStyle(fontSize: 18),
),
],
children: <Widget>[Text('* Genres', style: TextStyle(fontSize: 18))],
),
),
);
Expand Down Expand Up @@ -368,10 +360,7 @@ class _FavoriteNoteScreenState extends State<FavoriteNoteScreen> {
height: 30,
child: Row(
children: <Widget>[
Text(
'* Game Modes',
style: TextStyle(fontSize: 18),
),
Text('* Game Modes', style: TextStyle(fontSize: 18)),
],
),
),
Expand Down Expand Up @@ -440,23 +429,26 @@ class _FavoriteNoteScreenState extends State<FavoriteNoteScreen> {
padding: const EdgeInsets.only(right: 8.0, top: 0, bottom: 0),
child: GestureDetector(
onTap: () {
_launchURL('https://www.youtube'
'.com/watch?v=${_video[index].videoId}');
_launchURL(
'https://www.youtube'
'.com/watch?v=${_video[index].videoId}',
);
},
child: _video != null
? CachedNetworkImage(
fit: BoxFit.cover,
width: MediaQuery.of(context).size.width,
height: 250,
placeholder: (context, url) => Center(
child: CircularProgressIndicator(
backgroundColor: Colors.black,
),
),
errorWidget: (context, url, error) =>
new Icon(Icons.error),
imageUrl:
"https://img.youtube.com/vi/${_video[index].videoId}/0.jpg",
child: CircularProgressIndicator(
backgroundColor: Colors.black,
),
),
errorWidget:
(context, url, error) => new Icon(Icons.error),
imageUrl: "https://img.youtube.com/vi/${_video[
index
].videoId}/0.jpg",
)
: Image.asset('assets/dummy.png'),
),
Expand Down Expand Up @@ -504,13 +496,10 @@ class _FavoriteNoteScreenState extends State<FavoriteNoteScreen> {
xbox >= 1
? Column(
children: <Widget>[
Text(
xbox2.last.human,
style: TextStyle(fontSize: 12.0),
),
Text(xbox2.last.human, style: TextStyle(fontSize: 12.0)),
],
)
: Text('')
: Text(''),
],
),
);
Expand All @@ -537,13 +526,10 @@ class _FavoriteNoteScreenState extends State<FavoriteNoteScreen> {
xbox >= 1
? Column(
children: <Widget>[
Text(
xbox2.last.human,
style: TextStyle(fontSize: 12.0),
),
Text(xbox2.last.human, style: TextStyle(fontSize: 12.0)),
],
)
: Text('')
: Text(''),
],
),
);
Expand All @@ -570,13 +556,10 @@ class _FavoriteNoteScreenState extends State<FavoriteNoteScreen> {
xbox >= 1
? Column(
children: <Widget>[
Text(
xbox2.last.human,
style: TextStyle(fontSize: 12.0),
),
Text(xbox2.last.human, style: TextStyle(fontSize: 12.0)),
],
)
: Text('')
: Text(''),
],
),
);
Expand All @@ -602,13 +585,10 @@ class _FavoriteNoteScreenState extends State<FavoriteNoteScreen> {
xbox >= 1
? Column(
children: <Widget>[
Text(
xbox2.last.human,
style: TextStyle(fontSize: 12.0),
),
Text(xbox2.last.human, style: TextStyle(fontSize: 12.0)),
],
)
: Text('')
: Text(''),
],
),
);
Expand Down
126 changes: 56 additions & 70 deletions widgets-1/3rsin3rgul-Release-Date/lib/controller/game/tabs.dart
Original file line number Diff line number Diff line change
Expand Up @@ -49,10 +49,7 @@ class HomeTabState extends State<HomeTabApp> {
if (Platform.isAndroid) {
myBanner
..load()
..show(
anchorOffset: 50.0,
anchorType: AnchorType.bottom,
);
..show(anchorOffset: 50.0, anchorType: AnchorType.bottom);
}
}

Expand All @@ -72,80 +69,69 @@ class HomeTabState extends State<HomeTabApp> {
child: Scaffold(
resizeToAvoidBottomPadding: false,
appBar: AppBar(
brightness: Brightness.dark,
centerTitle: true,
actions: <Widget>[
Expanded(
child: Image.asset(
'assets/brand.png',
color: Colors.white60,
filterQuality: FilterQuality.high,
scale: 1.2,
),
)
],
bottom: TabBar(
indicatorColor: Colors.white60,
labelColor: Colors.white60,
tabs: [
Tab(
child: Text(
'July',
style: TextStyle(fontSize: 15, color: Colors.white60),
),
brightness: Brightness.dark,
centerTitle: true,
actions: <Widget>[
Expanded(
child: Image.asset(
'assets/brand.png',
color: Colors.white60,
filterQuality: FilterQuality.high,
scale: 1.2,
),
),
],
bottom: TabBar(
indicatorColor: Colors.white60,
labelColor: Colors.white60,
tabs: [
Tab(
child: Text(
'July',
style: TextStyle(fontSize: 15, color: Colors.white60),
),
Tab(
child: Text(
'Aug',
style: TextStyle(fontSize: 15, color: Colors.white60),
),
),
Tab(
child: Text(
'Aug',
style: TextStyle(fontSize: 15, color: Colors.white60),
),
Tab(
child: Text(
'Sep',
style: TextStyle(fontSize: 15, color: Colors.white60),
),
),
Tab(
child: Text(
'Sep',
style: TextStyle(fontSize: 15, color: Colors.white60),
),
Tab(
child: Text(
'Oct',
style: TextStyle(fontSize: 15, color: Colors.white60),
),
),
Tab(
child: Text(
'Oct',
style: TextStyle(fontSize: 15, color: Colors.white60),
),
Tab(
child: Text(
'Nov',
style: TextStyle(fontSize: 15, color: Colors.white60),
),
),
Tab(
child: Text(
'Nov',
style: TextStyle(fontSize: 15, color: Colors.white60),
),
Tab(
child: Text(
'Dec',
style: TextStyle(fontSize: 15, color: Colors.white60),
),
),
Tab(
child: Text(
'Dec',
style: TextStyle(fontSize: 15, color: Colors.white60),
),
],
)),
),
],
),
),
body: TabBarView(
children: [
Home(
"7",
),
Home(
"8",
),
Home(
"9",
),
Home(
"10",
),
Home(
"11",
),
Home(
"12",
),
Home("7"),
Home("8"),
Home("9"),
Home("10"),
Home("11"),
Home("12"),
],
),
),
Expand Down
6 changes: 4 additions & 2 deletions widgets-1/Akashdu-FlutterQuizzApp/lib/services/auth.dart
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,10 @@ class AuthService {
Future<void> updateUserData(FirebaseUser user) {
DocumentReference reportRef = _db.collection('reports').document(user.uid);

return reportRef.setData({'uid': user.uid, 'lastActivity': DateTime.now()},
merge: true);
return reportRef.setData({
'uid': user.uid,
'lastActivity': DateTime.now(),
}, merge: true);
}

Future<void> signOut() {
Expand Down

0 comments on commit b2d08f5

Please sign in to comment.