-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
0ebeeb4
commit 6c58897
Showing
6 changed files
with
202 additions
and
202 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,45 +1,45 @@ | ||
import 'package:flutter/material.dart'; | ||
import 'package:memoree_client/widgets/app_bar.dart'; | ||
import 'package:memoree_client/widgets/grid_results.dart'; | ||
import 'drawer.dart'; | ||
|
||
class AppScaffold extends StatelessWidget { | ||
const AppScaffold({Key key}) : super(key: key); | ||
|
||
@override | ||
Widget build(BuildContext context) { | ||
final bool isMobileLayout = MediaQuery.of(context).size.width < 600; | ||
final bool isTabletLayout = MediaQuery.of(context).size.width < 1008; | ||
|
||
return Scaffold( | ||
appBar: CustomAppBar( | ||
isMobile: isMobileLayout, | ||
isTablet: isTabletLayout | ||
), | ||
drawer: isMobileLayout ? AppDrawer() : null, | ||
body: SafeArea( | ||
child: Container( | ||
child: Row( | ||
children: <Widget>[ | ||
if(!isMobileLayout) | ||
AppDrawer(), | ||
Container( | ||
child: Expanded( | ||
child: ContentGrid() | ||
) | ||
) | ||
] | ||
) | ||
) | ||
) | ||
); | ||
} | ||
|
||
Widget appDrawer(bool isMobile, bool isTablet) | ||
{ | ||
if(isMobile) | ||
return AppDrawer(); | ||
|
||
return null; | ||
} | ||
import 'package:flutter/material.dart'; | ||
import 'package:memoree_client/widgets/app_bar.dart'; | ||
import 'package:memoree_client/widgets/grid_results.dart'; | ||
import 'drawer.dart'; | ||
|
||
class AppScaffold extends StatelessWidget { | ||
const AppScaffold({Key key}) : super(key: key); | ||
|
||
@override | ||
Widget build(BuildContext context) { | ||
final bool isMobileLayout = MediaQuery.of(context).size.width < 600; | ||
final bool isTabletLayout = MediaQuery.of(context).size.width < 1008; | ||
|
||
return Scaffold( | ||
appBar: CustomAppBar( | ||
isMobile: isMobileLayout, | ||
isTablet: isTabletLayout | ||
), | ||
drawer: isMobileLayout ? AppDrawer() : null, | ||
body: SafeArea( | ||
child: Container( | ||
child: Row( | ||
children: <Widget>[ | ||
if(!isMobileLayout) | ||
AppDrawer(), | ||
Container( | ||
child: Expanded( | ||
child: ContentGrid() | ||
) | ||
) | ||
] | ||
) | ||
) | ||
) | ||
); | ||
} | ||
|
||
Widget appDrawer(bool isMobile, bool isTablet) | ||
{ | ||
if(isMobile) | ||
return AppDrawer(); | ||
|
||
return null; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,45 +1,45 @@ | ||
import 'package:flutter/material.dart'; | ||
import 'package:memoree_client/constants.dart'; | ||
|
||
class AppDrawer extends StatefulWidget { | ||
|
||
@override | ||
_AppDrawerState createState() => _AppDrawerState(); | ||
} | ||
|
||
class _AppDrawerState extends State<AppDrawer> { | ||
int _selectedIndex = 0; | ||
|
||
@override | ||
Widget build(BuildContext context) { | ||
return SizedBox( | ||
width: 250, | ||
child: Drawer( | ||
elevation: 0.5, | ||
child: Row( | ||
children: <Widget>[ | ||
Expanded( | ||
child: ListView( | ||
padding: EdgeInsets.only(top: 25.0), | ||
children: <Widget>[ | ||
ListTile( | ||
leading: const Icon(Icons.movie_outlined), | ||
title: const Text(PageTitles.videos), | ||
selected: _selectedIndex == 0, | ||
onTap: () => { }, | ||
), | ||
ListTile( | ||
leading: const Icon(Icons.video_library_outlined), | ||
title: const Text(PageTitles.folders), | ||
selected: _selectedIndex == 1, | ||
onTap: () => {}, | ||
), | ||
], | ||
) | ||
), | ||
], | ||
) | ||
), | ||
); | ||
} | ||
import 'package:flutter/material.dart'; | ||
import 'package:memoree_client/constants.dart'; | ||
|
||
class AppDrawer extends StatefulWidget { | ||
|
||
@override | ||
_AppDrawerState createState() => _AppDrawerState(); | ||
} | ||
|
||
class _AppDrawerState extends State<AppDrawer> { | ||
int _selectedIndex = 0; | ||
|
||
@override | ||
Widget build(BuildContext context) { | ||
return SizedBox( | ||
width: 250, | ||
child: Drawer( | ||
elevation: 0.5, | ||
child: Row( | ||
children: <Widget>[ | ||
Expanded( | ||
child: ListView( | ||
padding: EdgeInsets.only(top: 25.0), | ||
children: <Widget>[ | ||
ListTile( | ||
leading: const Icon(Icons.movie_outlined), | ||
title: const Text(PageTitles.videos), | ||
selected: _selectedIndex == 0, | ||
onTap: () => { }, | ||
), | ||
ListTile( | ||
leading: const Icon(Icons.video_library_outlined), | ||
title: const Text(PageTitles.folders), | ||
selected: _selectedIndex == 1, | ||
onTap: () => {}, | ||
), | ||
], | ||
) | ||
), | ||
], | ||
) | ||
), | ||
); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,17 @@ | ||
// import 'package:flutter/material.dart'; | ||
// import 'package:memoree_client/constants.dart'; | ||
|
||
// class VideoPage extends StatelessWidget { | ||
// @override | ||
// Widget build(BuildContext context) { | ||
// final List<ThumbCarousel> carousels = PRESET_QUERIES.map<ThumbCarousel>((String query) { | ||
// return ThumbCarousel(query, query, 400); | ||
// }).toList(); | ||
|
||
// return SingleChildScrollView( | ||
// child: Column( | ||
// children: carousels, | ||
// ) | ||
// ) | ||
// } | ||
// import 'package:flutter/material.dart'; | ||
// import 'package:memoree_client/constants.dart'; | ||
|
||
// class VideoPage extends StatelessWidget { | ||
// @override | ||
// Widget build(BuildContext context) { | ||
// final List<ThumbCarousel> carousels = PRESET_QUERIES.map<ThumbCarousel>((String query) { | ||
// return ThumbCarousel(query, query, 400); | ||
// }).toList(); | ||
|
||
// return SingleChildScrollView( | ||
// child: Column( | ||
// children: carousels, | ||
// ) | ||
// ) | ||
// } | ||
// } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,33 +1,33 @@ | ||
import 'dart:io'; | ||
|
||
import 'package:flutter/material.dart'; | ||
import 'package:memoree_client/video_data.dart'; | ||
|
||
class ThumbnailGenerator extends StatelessWidget { | ||
final VideoData videoData; | ||
final bool dryrun; | ||
|
||
ThumbnailGenerator({this.videoData, this.dryrun}); | ||
|
||
@override | ||
Widget build(BuildContext context) { | ||
return FutureBuilder<String>( | ||
future: dryrun ? Future.delayed(Duration(seconds: 3)) : videoData.getThumbnail(), | ||
builder: (BuildContext context, AsyncSnapshot snapshot) { | ||
switch(snapshot.connectionState) { | ||
case ConnectionState.none: | ||
case ConnectionState.waiting: | ||
return Center(child: CircularProgressIndicator()); | ||
break; | ||
case ConnectionState.active: | ||
case ConnectionState.done: | ||
return dryrun ? | ||
Image.network('https://picsum.photos/250?image=9', fit: BoxFit.cover,) : | ||
Image.file(File(snapshot.data), fit: BoxFit.cover); | ||
break; | ||
} | ||
return Container(); | ||
} | ||
); | ||
} | ||
} | ||
import 'dart:io'; | ||
|
||
import 'package:flutter/material.dart'; | ||
import 'package:memoree_client/video_data.dart'; | ||
|
||
class ThumbnailGenerator extends StatelessWidget { | ||
final VideoData videoData; | ||
final bool dryrun; | ||
|
||
ThumbnailGenerator({this.videoData, this.dryrun}); | ||
|
||
@override | ||
Widget build(BuildContext context) { | ||
return FutureBuilder<String>( | ||
future: dryrun ? Future.delayed(Duration(seconds: 3)) : videoData.getThumbnail(), | ||
builder: (BuildContext context, AsyncSnapshot snapshot) { | ||
switch(snapshot.connectionState) { | ||
case ConnectionState.none: | ||
case ConnectionState.waiting: | ||
return Center(child: CircularProgressIndicator()); | ||
break; | ||
case ConnectionState.active: | ||
case ConnectionState.done: | ||
return dryrun ? | ||
Image.network('https://picsum.photos/250?image=9', fit: BoxFit.cover,) : | ||
Image.file(File(snapshot.data), fit: BoxFit.cover); | ||
break; | ||
} | ||
return Container(); | ||
} | ||
); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,21 @@ | ||
import 'package:flutter/material.dart'; | ||
|
||
class Carousel extends StatefulWidget { | ||
final String name; | ||
final String query; | ||
final double cardWidth; | ||
|
||
Carousel(this.name, this.query, this.cardWidth); | ||
|
||
@override | ||
_CarouselState createState() => _CarouselState(); | ||
} | ||
|
||
class _CarouselState extends State<Carousel> { | ||
@override | ||
Widget build(BuildContext context) { | ||
return Container( | ||
|
||
); | ||
} | ||
import 'package:flutter/material.dart'; | ||
|
||
class Carousel extends StatefulWidget { | ||
final String name; | ||
final String query; | ||
final double cardWidth; | ||
|
||
Carousel(this.name, this.query, this.cardWidth); | ||
|
||
@override | ||
_CarouselState createState() => _CarouselState(); | ||
} | ||
|
||
class _CarouselState extends State<Carousel> { | ||
@override | ||
Widget build(BuildContext context) { | ||
return Container( | ||
|
||
); | ||
} | ||
} |
Oops, something went wrong.