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
9 changes: 3 additions & 6 deletions analysis_options_plus.yaml
Original file line number Diff line number Diff line change
@@ -1,17 +1,14 @@
# This file was copied from plus_plugins/analysis_options.yaml.

include: package:pedantic/analysis_options.yaml
include: package:flutter_lints/flutter.yaml

analyzer:
enable-experiment:
- non-nullable
exclude:
# Ignore generated files
- '**/*.g.dart'
- 'lib/src/generated/*.dart'

linter:
rules:
public_member_api_docs: true
prefer_final_in_for_each: true
prefer_final_locals: true
- prefer_final_in_for_each
- prefer_final_locals
2 changes: 1 addition & 1 deletion packages/battery_plus/example/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ dev_dependencies:
sdk: flutter
integration_test_tizen:
path: ../../integration_test/
pedantic: ^1.9.2
flutter_lints: ^1.0.4

flutter:
uses-material-design: true
Expand Down
2 changes: 1 addition & 1 deletion packages/battery_plus/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ dependencies:
sdk: flutter

dev_dependencies:
pedantic: ^1.9.2
flutter_lints: ^1.0.4

environment:
sdk: ">=2.12.0 <3.0.0"
Expand Down
11 changes: 7 additions & 4 deletions packages/connectivity_plus/example/lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -5,32 +5,35 @@
// ignore_for_file: public_member_api_docs

import 'dart:async';
import 'dart:developer' as developer;

import 'package:connectivity_plus/connectivity_plus.dart';
import 'package:flutter/foundation.dart';
import 'package:flutter/material.dart';
import 'package:flutter/services.dart';

void main() {
runApp(MyApp());
runApp(const MyApp());
}

class MyApp extends StatelessWidget {
// This widget is the root of your application.
const MyApp({Key? key}) : super(key: key);

@override
Widget build(BuildContext context) {
return MaterialApp(
title: 'Flutter Demo',
theme: ThemeData(
primarySwatch: Colors.blue,
),
home: MyHomePage(title: 'Flutter Demo Home Page'),
home: const MyHomePage(title: 'Flutter Demo Home Page'),
);
}
}

class MyHomePage extends StatefulWidget {
MyHomePage({Key? key, required this.title}) : super(key: key);
const MyHomePage({Key? key, required this.title}) : super(key: key);

final String title;

Expand Down Expand Up @@ -65,7 +68,7 @@ class _MyHomePageState extends State<MyHomePage> {
try {
result = await _connectivity.checkConnectivity();
} on PlatformException catch (e) {
print(e.toString());
developer.log(e.toString());
return;
}

Expand Down
2 changes: 1 addition & 1 deletion packages/connectivity_plus/example/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ dev_dependencies:
sdk: flutter
integration_test_tizen:
path: ../../integration_test/
pedantic: ^1.9.2
flutter_lints: ^1.0.4

flutter:
uses-material-design: true
Expand Down
2 changes: 1 addition & 1 deletion packages/connectivity_plus/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ dependencies:
sdk: flutter

dev_dependencies:
pedantic: ^1.9.2
flutter_lints: ^1.0.4

environment:
sdk: ">=2.12.0 <3.0.0"
Expand Down
9 changes: 6 additions & 3 deletions packages/device_info_plus/example/lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -6,21 +6,24 @@
// ignore_for_file: public_member_api_docs

import 'dart:async';
import 'dart:developer' as developer;

import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
import 'package:device_info_plus_tizen/device_info_plus_tizen.dart';

void main() {
runZonedGuarded(() {
runApp(MyApp());
runApp(const MyApp());
}, (dynamic error, dynamic stack) {
print(error);
print(stack);
developer.log(error);
developer.log(stack);
});
}

class MyApp extends StatefulWidget {
const MyApp({Key? key}) : super(key: key);

@override
_MyAppState createState() => _MyAppState();
}
Expand Down
2 changes: 1 addition & 1 deletion packages/device_info_plus/example/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ dev_dependencies:
sdk: flutter
integration_test_tizen:
path: ../../integration_test/
pedantic: ^1.9.2
flutter_lints: ^1.0.4

flutter:
uses-material-design: true
Expand Down
2 changes: 1 addition & 1 deletion packages/device_info_plus/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ dependencies:
sdk: flutter

dev_dependencies:
pedantic: ^1.9.2
flutter_lints: ^1.0.4

environment:
sdk: '>=2.12.0 <3.0.0'
Expand Down
2 changes: 1 addition & 1 deletion packages/network_info_plus/example/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ dev_dependencies:
sdk: flutter
integration_test_tizen:
path: ../../integration_test/
pedantic: ^1.9.2
flutter_lints: ^1.0.4

flutter:
uses-material-design: true
Expand Down
2 changes: 1 addition & 1 deletion packages/network_info_plus/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ dependencies:
network_info_plus_platform_interface: ^1.1.0

dev_dependencies:
pedantic: ^1.9.2
flutter_lints: ^1.0.4

environment:
sdk: ">=2.12.0 <3.0.0"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ void main() {
});

testWidgets('example', (WidgetTester tester) async {
await tester.pumpWidget(MyApp());
await tester.pumpWidget(const MyApp());
await tester.pumpAndSettle();
expect(find.text('package_info_plus_tizen_example'), findsOneWidget);
expect(
Expand Down
8 changes: 5 additions & 3 deletions packages/package_info_plus/example/lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -10,22 +10,24 @@ import 'package:flutter/material.dart';
import 'package:package_info_plus/package_info_plus.dart';

void main() {
runApp(MyApp());
runApp(const MyApp());
}

class MyApp extends StatelessWidget {
const MyApp({Key? key}) : super(key: key);

@override
Widget build(BuildContext context) {
return MaterialApp(
title: 'PackageInfo Demo',
theme: ThemeData(primarySwatch: Colors.blue),
home: MyHomePage(title: 'PackageInfo example app'),
home: const MyHomePage(title: 'PackageInfo example app'),
);
}
}

class MyHomePage extends StatefulWidget {
MyHomePage({Key? key, this.title}) : super(key: key);
const MyHomePage({Key? key, this.title}) : super(key: key);

final String? title;

Expand Down
2 changes: 1 addition & 1 deletion packages/package_info_plus/example/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ dev_dependencies:
sdk: flutter
integration_test_tizen:
path: ../../integration_test/
pedantic: ^1.9.2
flutter_lints: ^1.0.4

flutter:
uses-material-design: true
Expand Down
2 changes: 1 addition & 1 deletion packages/package_info_plus/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ dependencies:
package_info_plus_platform_interface: ^1.0.2

dev_dependencies:
pedantic: ^1.9.2
flutter_lints: ^1.0.4

environment:
sdk: ">=2.12.0 <3.0.0"
Expand Down
8 changes: 5 additions & 3 deletions packages/sensors_plus/example/lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -11,24 +11,26 @@ import 'package:sensors_plus/sensors_plus.dart';
import 'snake.dart';

void main() {
runApp(MyApp());
runApp(const MyApp());
}

class MyApp extends StatelessWidget {
const MyApp({Key? key}) : super(key: key);

@override
Widget build(BuildContext context) {
return MaterialApp(
title: 'Sensors Demo',
theme: ThemeData(
primarySwatch: Colors.blue,
),
home: MyHomePage(title: 'Flutter Demo Home Page'),
home: const MyHomePage(title: 'Flutter Demo Home Page'),
);
}
}

class MyHomePage extends StatefulWidget {
MyHomePage({Key? key, this.title}) : super(key: key);
const MyHomePage({Key? key, this.title}) : super(key: key);

final String? title;

Expand Down
4 changes: 3 additions & 1 deletion packages/sensors_plus/example/lib/snake.dart
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@ import 'package:flutter/material.dart';
import 'package:sensors_plus/sensors_plus.dart';

class Snake extends StatefulWidget {
Snake({this.rows = 20, this.columns = 20, this.cellSize = 10.0}) {
Snake({Key? key, this.rows = 20, this.columns = 20, this.cellSize = 10.0})
: super(key: key) {
assert(10 <= rows);
assert(10 <= columns);
assert(5.0 <= cellSize);
Expand All @@ -22,6 +23,7 @@ class Snake extends StatefulWidget {
final double cellSize;

@override
// ignore: no_logic_in_create_state
State<StatefulWidget> createState() => SnakeState(rows, columns, cellSize);
}

Expand Down
2 changes: 1 addition & 1 deletion packages/sensors_plus/example/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ dev_dependencies:
sdk: flutter
integration_test_tizen:
path: ../../integration_test/
pedantic: ^1.9.2
flutter_lints: ^1.0.4

flutter:
uses-material-design: true
Expand Down
2 changes: 1 addition & 1 deletion packages/sensors_plus/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ dependencies:
sdk: flutter

dev_dependencies:
pedantic: ^1.9.2
flutter_lints: ^1.0.4

environment:
sdk: ">=2.12.0 <3.0.0"
Expand Down
4 changes: 2 additions & 2 deletions packages/share_plus/example/lib/image_previews.dart
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ class _ImagePreview extends StatelessWidget {
child: Stack(
children: <Widget>[
ConstrainedBox(
constraints: BoxConstraints(
constraints: const BoxConstraints(
maxWidth: 200,
maxHeight: 200,
),
Expand All @@ -65,7 +65,7 @@ class _ImagePreview extends StatelessWidget {
child: FloatingActionButton(
backgroundColor: Colors.red,
onPressed: onDelete,
child: Icon(Icons.delete)),
child: const Icon(Icons.delete)),
),
),
],
Expand Down
8 changes: 5 additions & 3 deletions packages/share_plus/example/lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,12 @@ import 'package:share_plus/share_plus.dart';
import 'image_previews.dart';

void main() {
runApp(DemoApp());
runApp(const DemoApp());
}

class DemoApp extends StatefulWidget {
const DemoApp({Key? key}) : super(key: key);

@override
DemoAppState createState() => DemoAppState();
}
Expand Down Expand Up @@ -62,8 +64,8 @@ class DemoAppState extends State<DemoApp> {
ImagePreviews(imagePaths, onDelete: _onDeleteImage),
Center(
child: ListTile(
leading: Icon(Icons.add),
title: Text('Add image'),
leading: const Icon(Icons.add),
title: const Text('Add image'),
onTap: () async {
final imagePicker = ImagePicker();
final pickedFile = await imagePicker.pickImage(
Expand Down
2 changes: 1 addition & 1 deletion packages/share_plus/example/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ dev_dependencies:
sdk: flutter
integration_test_tizen:
path: ../../integration_test/
pedantic: ^1.9.2
flutter_lints: ^1.0.4

flutter:
uses-material-design: true
Expand Down
2 changes: 1 addition & 1 deletion packages/share_plus/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ dependencies:
share_plus_platform_interface: ^2.0.0

dev_dependencies:
pedantic: ^1.9.2
flutter_lints: ^1.0.4

environment:
sdk: ">=2.12.0 <3.0.0"
Expand Down