Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion client/analysis_options.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
include: package:lint/analysis_options.yaml
analyzer:
exclude:
- lib/**/*.pb*.dart
- lib/**/*.pb*.dart
- lib/test-server.dart
- test/**/*.mocks.dart
Binary file added client/fonts/DancingScript-Medium.ttf
Binary file not shown.
Binary file added client/fonts/DancingScript-Regular.ttf
Binary file not shown.
Binary file added client/fonts/PermanentMarker-Regular.ttf
Binary file not shown.
Binary file added client/images/pytorch-logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added client/images/tf-logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
60 changes: 38 additions & 22 deletions client/lib/protos/pkg/pr12er/messages.pb.dart

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

15 changes: 8 additions & 7 deletions client/lib/protos/pkg/pr12er/messages.pbjson.dart

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

78 changes: 61 additions & 17 deletions client/lib/screens/detail_screen.dart
Original file line number Diff line number Diff line change
@@ -1,8 +1,13 @@
import 'package:flutter/material.dart';
import 'package:pr12er/protos/pkg/pr12er/messages.pb.dart';
import 'package:pr12er/service.dart';
import 'package:pr12er/widgets/detail/abstract.dart';
import 'package:pr12er/widgets/detail/header.dart';
import 'package:pr12er/utils/extractor.dart';
import 'package:pr12er/widgets/detail/recommendataion.dart';
import 'package:pr12er/widgets/detail/repository.dart';
import 'package:pr12er/widgets/detail/youtube.dart';
import 'package:provider/provider.dart';

class DetailScreenArguments {
final Video video;
Expand Down Expand Up @@ -39,25 +44,64 @@ class DetailScreen extends StatelessWidget {
title: Text(args.video.title,
key: const ValueKey("$routeName/appBar/title")),
),
body: CustomScrollView(
slivers: [
SliverList(
delegate: SliverChildListDelegate([
YoutubeWidget(youtubeId: extractYoutubeId(args.video.link)),
Container(
margin: const EdgeInsets.only(top: 5, left: 10, right: 10),
child: Column(
children: [
HeaderWidget(video: args.video),
const SizedBox(height: 10),
getHorizontalLine(),
const SizedBox(height: 10),
],
),
)
]))
body: Column(
children: [
YoutubeWidget(youtubeId: extractYoutubeId(args.video.link)),
Expanded(
child: CustomScrollView(
slivers: [
SliverList(
delegate: SliverChildListDelegate([
Container(
margin: const EdgeInsets.only(top: 5, left: 10, right: 10),
child: Column(
children: [
HeaderWidget(video: args.video),
const SizedBox(height: 10),
getHorizontalLine(),
const SizedBox(height: 10),
FutureBuilder<Detail>(
future: context
.read<GrpcClient>()
.getDetails(args.video.id),
builder: (context, AsyncSnapshot<Detail> snapshot) {
if (!snapshot.hasData) {
return const Center(
child: CircularProgressIndicator());
}

return Column(children: [
PaperAbstractWidget(
paper: snapshot.data!.paper[0]),
const SizedBox(height: 10),
getHorizontalLine(),
const SizedBox(height: 10),
RecommentationWidget(detail: snapshot.data!),
const SizedBox(height: 10),
getHorizontalLine(),
const SizedBox(height: 10),
RepositoryWidget(
repositories:
snapshot.data!.paper[0].repositories,
)
]);
},
)
],
),
)
]))
],
),
),
],
),
floatingActionButton: FloatingActionButton(
onPressed: () {
// Add your onPressed code here!
},
child: const Icon(Icons.email),
),
);
}
}
9 changes: 8 additions & 1 deletion client/lib/screens/main_screen.dart
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,14 @@ class MainScreen extends StatelessWidget {
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
leading: const Icon(Icons.search),
actions: <Widget>[
IconButton(
icon: const Icon(Icons.search),
onPressed: () {
// do something
},
)
],
title: const Text(appName),
),
body: PRVideos());
Expand Down
7 changes: 7 additions & 0 deletions client/lib/service.dart
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,13 @@ class GrpcClient {

return response.videos;
}

Future<Detail> getDetails(int videoId) async {
final request = GetDetailsRequest(prId: videoId);
final response = await _client.getDetails(request);

return response.detail;
}
}

ClientChannel _getKkweonOktetoChannel() {
Expand Down
Loading