Skip to content

Commit

Permalink
ci(examples): fix linting issues
Browse files Browse the repository at this point in the history
  • Loading branch information
micimize committed Mar 5, 2021
1 parent 66b4bdb commit 4935740
Show file tree
Hide file tree
Showing 9 changed files with 52 additions and 54 deletions.
1 change: 0 additions & 1 deletion examples/flutter_bloc/lib/hive_init.dart
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import 'package:flutter/foundation.dart' show kIsWeb;
import 'package:flutter/material.dart' show WidgetsFlutterBinding;

import 'package:hive/hive.dart' show Hive;
import 'package:path_provider/path_provider.dart'
Expand Down
2 changes: 1 addition & 1 deletion examples/starwars/lib/episode/hero_query.dart
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ class HeroForEpisode extends StatelessWidget {
Text(
getPrettyJSONString(result.data),
),
RaisedButton(
ElevatedButton(
onPressed: result.isNotLoading ? refetch : null,
child: const Text('REFETCH'),
),
Expand Down
2 changes: 1 addition & 1 deletion examples/starwars/lib/reviews/review_page_list.dart
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ class PagingReviews extends StatelessWidget {
? Center(
child: CircularProgressIndicator(),
)
: RaisedButton(
: ElevatedButton(
onPressed: () {
fetchMore(
FetchMoreOptions.partial(
Expand Down
1 change: 0 additions & 1 deletion packages/graphql/lib/src/cache/data_proxy.dart
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import 'package:gql_exec/gql_exec.dart' show Request;
import 'package:graphql/src/cache/_normalizing_data_proxy.dart';
import 'package:graphql/src/exceptions/exceptions_next.dart';

import './fragment.dart';
Expand Down
1 change: 1 addition & 0 deletions packages/graphql/lib/src/core/policies.dart
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ bool willAlwaysExecuteOnNetwork(FetchPolicy policy) {
case FetchPolicy.cacheOnly:
return false;
}
return false;
}

/// [ErrorPolicy] determines the level of events for GraphQL Errors in the execution result. The options are:
Expand Down
1 change: 0 additions & 1 deletion packages/graphql/lib/src/core/query_manager.dart
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import 'dart:async';

import 'package:graphql/src/cache/_optimistic_transactions.dart';
import 'package:meta/meta.dart';
import 'package:collection/collection.dart';

Expand Down
8 changes: 4 additions & 4 deletions packages/graphql_flutter/example/lib/fetchmore/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -153,16 +153,16 @@ class _MyHomePageState extends State<MyHomePage> {
),
Text('note: this example has no mutations',
style: Theme.of(context).textTheme.caption),
RaisedButton(
ElevatedButton(
onPressed: () {
fetchMore(opts);
},
child: Row(
mainAxisAlignment: MainAxisAlignment.center,
children: <Widget>[
Text('Load More'),
],
),
onPressed: () {
fetchMore(opts);
},
)
],
),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -304,10 +304,10 @@ void _simpleAlert(BuildContext context, String text) => showDialog<AlertDialog>(
title: Text(text),
actions: <Widget>[
SimpleDialogOption(
child: const Text('DISMISS'),
onPressed: () {
Navigator.of(context).pop();
},
child: const Text('DISMISS'),
)
],
);
Expand Down
88 changes: 44 additions & 44 deletions packages/graphql_flutter/example/lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -11,52 +11,52 @@ void main() => runApp(
),
home: Builder(
builder: (BuildContext context) => Scaffold(
appBar: AppBar(
title: const Text('GraphQL Demo App'),
),
body: Center(
child: Column(
children: <Widget>[
RaisedButton(
child: const Text('GraphQL BloC pattern'),
onPressed: () {
Navigator.push(
context,
MaterialPageRoute<GraphQLWidgetScreen>(
builder: (BuildContext context) =>
GraphQLBlocPatternScreen(),
),
);
},
),
RaisedButton(
child: const Text('GraphQL Widget'),
onPressed: () {
Navigator.push(
context,
MaterialPageRoute<GraphQLWidgetScreen>(
builder: (BuildContext context) =>
const GraphQLWidgetScreen(),
),
);
},
),
RaisedButton(
child: const Text('Fetchmore (Pagination) Example'),
onPressed: () {
Navigator.push(
context,
MaterialPageRoute<FetchMoreWidgetScreen>(
builder: (BuildContext context) =>
const FetchMoreWidgetScreen(),
),
);
},
),
],
appBar: AppBar(
title: const Text('GraphQL Demo App'),
),
body: Center(
child: Column(
children: <Widget>[
ElevatedButton(
onPressed: () {
Navigator.push(
context,
MaterialPageRoute<GraphQLWidgetScreen>(
builder: (BuildContext context) =>
GraphQLBlocPatternScreen(),
),
);
},
child: const Text('GraphQL BloC pattern'),
),
),
ElevatedButton(
onPressed: () {
Navigator.push(
context,
MaterialPageRoute<GraphQLWidgetScreen>(
builder: (BuildContext context) =>
const GraphQLWidgetScreen(),
),
);
},
child: const Text('GraphQL Widget'),
),
ElevatedButton(
onPressed: () {
Navigator.push(
context,
MaterialPageRoute<FetchMoreWidgetScreen>(
builder: (BuildContext context) =>
const FetchMoreWidgetScreen(),
),
);
},
child: const Text('Fetchmore (Pagination) Example'),
),
],
),
),
),
),
),
);

0 comments on commit 4935740

Please sign in to comment.