Skip to content

Commit

Permalink
opt into the null safety
Browse files Browse the repository at this point in the history
  • Loading branch information
featzima committed Jan 21, 2021
1 parent d46c337 commit 06d6512
Show file tree
Hide file tree
Showing 10 changed files with 536 additions and 548 deletions.
1 change: 0 additions & 1 deletion example/.flutter-plugins-dependencies

This file was deleted.

1 change: 1 addition & 0 deletions example/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,4 @@
build/

.flutter-plugins
.flutter-plugins-dependencies
5 changes: 3 additions & 2 deletions example/lib/cupertino_app.dart
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
import 'package:flutter/cupertino.dart';
import 'package:flutter_typeahead/cupertino_flutter_typeahead.dart';
import 'dart:async';

import 'package:example/data.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter_typeahead/cupertino_flutter_typeahead.dart';

class MyCupertinoApp extends StatelessWidget {
@override
Expand Down
3 changes: 2 additions & 1 deletion example/lib/data.dart
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import 'dart:async';
import 'dart:math';

class BackendService {
Expand Down Expand Up @@ -28,7 +29,7 @@ class CitiesService {
];

static List<String> getSuggestions(String query) {
List<String> matches = List();
List<String> matches = <String>[];
matches.addAll(cities);

matches.retainWhere((s) => s.toLowerCase().contains(query.toLowerCase()));
Expand Down
55 changes: 31 additions & 24 deletions example/pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -7,42 +7,42 @@ packages:
name: async
url: "https://pub.dartlang.org"
source: hosted
version: "2.5.0-nullsafety.1"
version: "2.5.0-nullsafety.3"
boolean_selector:
dependency: transitive
description:
name: boolean_selector
url: "https://pub.dartlang.org"
source: hosted
version: "2.1.0-nullsafety.1"
version: "2.1.0-nullsafety.3"
characters:
dependency: transitive
description:
name: characters
url: "https://pub.dartlang.org"
source: hosted
version: "1.1.0-nullsafety.3"
version: "1.1.0-nullsafety.5"
charcode:
dependency: transitive
description:
name: charcode
url: "https://pub.dartlang.org"
source: hosted
version: "1.2.0-nullsafety.1"
version: "1.2.0-nullsafety.3"
clock:
dependency: transitive
description:
name: clock
url: "https://pub.dartlang.org"
source: hosted
version: "1.1.0-nullsafety.1"
version: "1.1.0-nullsafety.3"
collection:
dependency: transitive
description:
name: collection
url: "https://pub.dartlang.org"
source: hosted
version: "1.15.0-nullsafety.3"
version: "1.15.0-nullsafety.5"
cupertino_icons:
dependency: "direct main"
description:
Expand All @@ -56,7 +56,7 @@ packages:
name: fake_async
url: "https://pub.dartlang.org"
source: hosted
version: "1.2.0-nullsafety.1"
version: "1.2.0-nullsafety.3"
flutter:
dependency: "direct main"
description: flutter
Expand All @@ -68,21 +68,21 @@ packages:
name: flutter_keyboard_visibility
url: "https://pub.dartlang.org"
source: hosted
version: "4.0.2"
version: "5.0.0-nullsafety.0"
flutter_keyboard_visibility_platform_interface:
dependency: transitive
description:
name: flutter_keyboard_visibility_platform_interface
url: "https://pub.dartlang.org"
source: hosted
version: "1.0.1"
version: "2.0.0-nullsafety.0"
flutter_keyboard_visibility_web:
dependency: transitive
description:
name: flutter_keyboard_visibility_web
url: "https://pub.dartlang.org"
source: hosted
version: "1.0.1"
version: "2.0.0-nullsafety.0"
flutter_test:
dependency: "direct dev"
description: flutter
Expand All @@ -94,40 +94,47 @@ packages:
path: ".."
relative: true
source: path
version: "2.0.0"
version: "2.1.0-nullsafety.0"
flutter_web_plugins:
dependency: transitive
description: flutter
source: sdk
version: "0.0.0"
js:
dependency: transitive
description:
name: js
url: "https://pub.dartlang.org"
source: hosted
version: "0.6.3-nullsafety.3"
matcher:
dependency: transitive
description:
name: matcher
url: "https://pub.dartlang.org"
source: hosted
version: "0.12.10-nullsafety.1"
version: "0.12.10-nullsafety.3"
meta:
dependency: transitive
description:
name: meta
url: "https://pub.dartlang.org"
source: hosted
version: "1.3.0-nullsafety.3"
version: "1.3.0-nullsafety.6"
path:
dependency: transitive
description:
name: path
url: "https://pub.dartlang.org"
source: hosted
version: "1.8.0-nullsafety.1"
version: "1.8.0-nullsafety.3"
plugin_platform_interface:
dependency: transitive
description:
name: plugin_platform_interface
url: "https://pub.dartlang.org"
source: hosted
version: "1.0.3"
version: "1.1.0-nullsafety.1"
sky_engine:
dependency: transitive
description: flutter
Expand All @@ -139,56 +146,56 @@ packages:
name: source_span
url: "https://pub.dartlang.org"
source: hosted
version: "1.8.0-nullsafety.2"
version: "1.8.0-nullsafety.4"
stack_trace:
dependency: transitive
description:
name: stack_trace
url: "https://pub.dartlang.org"
source: hosted
version: "1.10.0-nullsafety.1"
version: "1.10.0-nullsafety.6"
stream_channel:
dependency: transitive
description:
name: stream_channel
url: "https://pub.dartlang.org"
source: hosted
version: "2.1.0-nullsafety.1"
version: "2.1.0-nullsafety.3"
string_scanner:
dependency: transitive
description:
name: string_scanner
url: "https://pub.dartlang.org"
source: hosted
version: "1.1.0-nullsafety.1"
version: "1.1.0-nullsafety.3"
term_glyph:
dependency: transitive
description:
name: term_glyph
url: "https://pub.dartlang.org"
source: hosted
version: "1.2.0-nullsafety.1"
version: "1.2.0-nullsafety.3"
test_api:
dependency: transitive
description:
name: test_api
url: "https://pub.dartlang.org"
source: hosted
version: "0.2.19-nullsafety.2"
version: "0.2.19-nullsafety.6"
typed_data:
dependency: transitive
description:
name: typed_data
url: "https://pub.dartlang.org"
source: hosted
version: "1.3.0-nullsafety.3"
version: "1.3.0-nullsafety.5"
vector_math:
dependency: transitive
description:
name: vector_math
url: "https://pub.dartlang.org"
source: hosted
version: "2.1.0-nullsafety.3"
version: "2.1.0-nullsafety.5"
sdks:
dart: ">=2.10.0-110 <2.11.0"
dart: ">=2.12.0-29.10.beta <3.0.0"
flutter: ">=1.20.0"
3 changes: 2 additions & 1 deletion example/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@ dependencies:
dev_dependencies:
flutter_test:
sdk: flutter

environment:
sdk: '>=1.19.0 <3.0.0'

# For information on the generic Dart part of this file, see the
# following page: https://www.dartlang.org/tools/pub/pubspec
Expand Down
Loading

0 comments on commit 06d6512

Please sign in to comment.