Skip to content

Commit

Permalink
fix: build errors in Flutter
Browse files Browse the repository at this point in the history
  • Loading branch information
kkweon committed Sep 9, 2021
1 parent e8dbc76 commit 5dce313
Show file tree
Hide file tree
Showing 13 changed files with 251 additions and 115 deletions.
2 changes: 2 additions & 0 deletions client/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -44,3 +44,5 @@ app.*.map.json
/android/app/debug
/android/app/profile
/android/app/release

build
3 changes: 3 additions & 0 deletions client/analysis_options.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,6 @@ linter:
sort_unnamed_constructors_first: false
implementation_imports: false
invalid_implementation_override: false
unnecessary_overrides: false
require_trailing_commas: false
camel_case_types: false
34 changes: 27 additions & 7 deletions client/lib/protos/pkg/pr12er/database.pb.dart
Original file line number Diff line number Diff line change
Expand Up @@ -94,8 +94,11 @@ class MappingTableRow extends $pb.GeneratedMessage {
const $core.bool.fromEnvironment('protobuf.omit_field_names')
? ''
: 'paperArxivIds')
..aOS(3,
const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'youtubeVideoId')
..aOS(
3,
const $core.bool.fromEnvironment('protobuf.omit_field_names')
? ''
: 'youtubeVideoId')
..hasRequiredFields = false;

MappingTableRow._() : super();
Expand Down Expand Up @@ -250,10 +253,17 @@ class PrVideo extends $pb.GeneratedMessage {
: 'prId',
$pb.PbFieldType.O3)
..pc<$2.Paper>(
2, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'papers', $pb.PbFieldType.PM,
2,
const $core.bool.fromEnvironment('protobuf.omit_field_names')
? ''
: 'papers',
$pb.PbFieldType.PM,
subBuilder: $2.Paper.create)
..aOM<YouTubeVideo>(
3, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'video',
3,
const $core.bool.fromEnvironment('protobuf.omit_field_names')
? ''
: 'video',
subBuilder: YouTubeVideo.create)
..hasRequiredFields = false;

Expand Down Expand Up @@ -332,7 +342,10 @@ class PrVideo extends $pb.GeneratedMessage {
}

class YouTubeVideo extends $pb.GeneratedMessage {
static final $pb.BuilderInfo _i = $pb.BuilderInfo(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'YouTubeVideo',
static final $pb.BuilderInfo _i = $pb.BuilderInfo(
const $core.bool.fromEnvironment('protobuf.omit_message_names')
? ''
: 'YouTubeVideo',
package: const $pb.PackageName(
const $core.bool.fromEnvironment('protobuf.omit_message_names')
? ''
Expand All @@ -359,9 +372,16 @@ class YouTubeVideo extends $pb.GeneratedMessage {
? ''
: 'numberOfViews')
..aOM<$1.Timestamp>(
5, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'publishedDate',
5,
const $core.bool.fromEnvironment('protobuf.omit_field_names')
? ''
: 'publishedDate',
subBuilder: $1.Timestamp.create)
..aOS(6, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'uploader')
..aOS(
6,
const $core.bool.fromEnvironment('protobuf.omit_field_names')
? ''
: 'uploader')
..hasRequiredFields = false;

YouTubeVideo._() : super();
Expand Down
122 changes: 102 additions & 20 deletions client/lib/protos/pkg/pr12er/messages.pb.dart
Original file line number Diff line number Diff line change
Expand Up @@ -37,14 +37,46 @@ class Video extends $pb.GeneratedMessage {
const $core.bool.fromEnvironment('protobuf.omit_field_names')
? ''
: 'title')
..aOS(3,
const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'link')
..aOS(4, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'presenter')
..e<Category>(5, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'category', $pb.PbFieldType.OE, defaultOrMaker: Category.CATEGORY_UNSPECIFIED, valueOf: Category.valueOf, enumValues: Category.values)
..aInt64(6, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'numberOfLike')
..pPS(7, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'keywords')
..aInt64(8, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'numberOfViews')
..aOM<$1.Timestamp>(9, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'publishedDate', subBuilder: $1.Timestamp.create)
..aOS(
3,
const $core.bool.fromEnvironment('protobuf.omit_field_names')
? ''
: 'link')
..aOS(
4,
const $core.bool.fromEnvironment('protobuf.omit_field_names')
? ''
: 'presenter')
..e<Category>(
5,
const $core.bool.fromEnvironment('protobuf.omit_field_names')
? ''
: 'category',
$pb.PbFieldType.OE,
defaultOrMaker: Category.CATEGORY_UNSPECIFIED,
valueOf: Category.valueOf,
enumValues: Category.values)
..aInt64(
6,
const $core.bool.fromEnvironment('protobuf.omit_field_names')
? ''
: 'numberOfLike')
..pPS(
7,
const $core.bool.fromEnvironment('protobuf.omit_field_names')
? ''
: 'keywords')
..aInt64(
8,
const $core.bool.fromEnvironment('protobuf.omit_field_names')
? ''
: 'numberOfViews')
..aOM<$1.Timestamp>(
9,
const $core.bool.fromEnvironment('protobuf.omit_field_names')
? ''
: 'publishedDate',
subBuilder: $1.Timestamp.create)
..hasRequiredFields = false;

Video._() : super();
Expand Down Expand Up @@ -234,12 +266,26 @@ class Detail extends $pb.GeneratedMessage {
: 'prId',
$pb.PbFieldType.O3)
..pc<Paper>(
2, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'papers', $pb.PbFieldType.PM,
2,
const $core.bool.fromEnvironment('protobuf.omit_field_names')
? ''
: 'papers',
$pb.PbFieldType.PM,
subBuilder: Paper.create)
..pc<Paper>(
3,
const $core.bool.fromEnvironment('protobuf.omit_field_names')
? ''
: 'relevantPapers',
$pb.PbFieldType.PM,
subBuilder: Paper.create)
..pc<Paper>(
3, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'relevantPapers', $pb.PbFieldType.PM,
4,
const $core.bool.fromEnvironment('protobuf.omit_field_names')
? ''
: 'sameAuthorPapers',
$pb.PbFieldType.PM,
subBuilder: Paper.create)
..pc<Paper>(4, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'sameAuthorPapers', $pb.PbFieldType.PM, subBuilder: Paper.create)
..hasRequiredFields = false;

Detail._() : super();
Expand Down Expand Up @@ -337,12 +383,36 @@ class Paper extends $pb.GeneratedMessage {
const $core.bool.fromEnvironment('protobuf.omit_field_names')
? ''
: 'arxivId')
..aOS(4,
const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'abstract')
..aOM<$1.Timestamp>(5, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'publishedDate', subBuilder: $1.Timestamp.create)
..pPS(6, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'authors')
..pc<Repository>(7, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'repositories', $pb.PbFieldType.PM, subBuilder: Repository.create)
..pc<Method>(8, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'methods', $pb.PbFieldType.PM, subBuilder: Method.create)
..aOS(
4,
const $core.bool.fromEnvironment('protobuf.omit_field_names')
? ''
: 'abstract')
..aOM<$1.Timestamp>(
5,
const $core.bool.fromEnvironment('protobuf.omit_field_names')
? ''
: 'publishedDate',
subBuilder: $1.Timestamp.create)
..pPS(
6,
const $core.bool.fromEnvironment('protobuf.omit_field_names')
? ''
: 'authors')
..pc<Repository>(
7,
const $core.bool.fromEnvironment('protobuf.omit_field_names')
? ''
: 'repositories',
$pb.PbFieldType.PM,
subBuilder: Repository.create)
..pc<Method>(
8,
const $core.bool.fromEnvironment('protobuf.omit_field_names')
? ''
: 'methods',
$pb.PbFieldType.PM,
subBuilder: Method.create)
..hasRequiredFields = false;

Paper._() : super();
Expand Down Expand Up @@ -507,12 +577,24 @@ class Repository extends $pb.GeneratedMessage {
? ''
: 'owner')
..e<Framework>(
4, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'framework', $pb.PbFieldType.OE,
4,
const $core.bool.fromEnvironment('protobuf.omit_field_names')
? ''
: 'framework',
$pb.PbFieldType.OE,
defaultOrMaker: Framework.FRAMEWORK_UNSPECIFIED,
valueOf: Framework.valueOf,
enumValues: Framework.values)
..aInt64(5, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'numberOfStars')
..aOS(6, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'description')
..aInt64(
5,
const $core.bool.fromEnvironment('protobuf.omit_field_names')
? ''
: 'numberOfStars')
..aOS(
6,
const $core.bool.fromEnvironment('protobuf.omit_field_names')
? ''
: 'description')
..hasRequiredFields = false;

Repository._() : super();
Expand Down
7 changes: 5 additions & 2 deletions client/lib/protos/pkg/pr12er/service.pb.dart
Original file line number Diff line number Diff line change
Expand Up @@ -408,8 +408,11 @@ class ReportRequest extends $pb.GeneratedMessage {
defaultOrMaker: ReportRequest_ReportType.REPORT_TYPE_UNSPECIFIED,
valueOf: ReportRequest_ReportType.valueOf,
enumValues: ReportRequest_ReportType.values)
..aOS(2,
const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'body')
..aOS(
2,
const $core.bool.fromEnvironment('protobuf.omit_field_names')
? ''
: 'body')
..hasRequiredFields = false;

ReportRequest._() : super();
Expand Down
4 changes: 2 additions & 2 deletions client/lib/widgets/components/expandable_text.dart
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ class _ExpandableTextState extends State<ExpandableText> {
IconButton(
iconSize: iconSize,
onPressed: onPressed,
color: Theme.of(context).accentColor,
color: Theme.of(context).colorScheme.secondary,
icon: const Icon(Icons.keyboard_arrow_up)),
],
),
Expand All @@ -58,7 +58,7 @@ class _ExpandableTextState extends State<ExpandableText> {
child: IconButton(
iconSize: iconSize,
onPressed: onPressed,
color: Theme.of(context).accentColor,
color: Theme.of(context).colorScheme.secondary,
icon: const Icon(Icons.keyboard_arrow_down)))
]),
);
Expand Down
2 changes: 1 addition & 1 deletion client/lib/widgets/main/pr12video.dart
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ class PR12Video extends StatelessWidget {
? Icons.bookmark_add_rounded
: Icons.bookmark_add_outlined,
size: 30,
color: Theme.of(context).accentColor,
color: Theme.of(context).colorScheme.secondary,
),
);
},
Expand Down
7 changes: 4 additions & 3 deletions client/lib/widgets/main/report.dart
Original file line number Diff line number Diff line change
Expand Up @@ -30,14 +30,14 @@ class _ReportWidgetState extends State<ReportWidget> {
.textTheme
.headline1
?.apply(fontWeightDelta: 5)),
leading:
Icon(Icons.report, size: 30, color: Theme.of(context).accentColor),
leading: Icon(Icons.report,
size: 30, color: Theme.of(context).colorScheme.secondary),
),
Divider(
indent: 20,
endIndent: 20,
thickness: 2,
color: Theme.of(context).accentColor,
color: Theme.of(context).colorScheme.secondary,
),
Container(
padding: const EdgeInsets.only(left: 20, right: 20),
Expand Down Expand Up @@ -92,6 +92,7 @@ class _ReportWidgetState extends State<ReportWidget> {
final resp = await context
.read<GrpcClient>()
.report(currentReportType, _reportTextFieldController.text);
if (!mounted) return;
Navigator.of(context).pop();
showSnackbar(resp.issueUrl);
},
Expand Down
Loading

0 comments on commit 5dce313

Please sign in to comment.