Browse Source

example nullsafety migration

master
Herbert Poul 4 years ago
parent
commit
dc493100ad
  1. 19
      example/lib/main.dart
  2. 59
      example/pubspec.lock
  3. 4
      example/pubspec.yaml
  4. 4
      pubspec.lock
  5. 2
      pubspec.yaml

19
example/lib/main.dart

@ -1,5 +1,6 @@
import 'dart:convert';
import 'dart:math';
import 'dart:typed_data';
import 'package:argon2_ffi_base/argon2_ffi_base.dart';
import 'package:flutter/material.dart';
@ -15,7 +16,7 @@ class _MyAppState extends State<MyApp> {
final _argon2ffi = Argon2FfiFlutter();
final random = Random();
String result;
String? result;
@override
void initState() {
@ -32,22 +33,12 @@ class _MyAppState extends State<MyApp> {
body: Column(
children: <Widget>[
Text('Result: $result\n'),
RaisedButton(
child: Text('Do it'),
onPressed: () {
int x = random.nextInt(20);
int y = random.nextInt(20);
setState(() {
result = '$x + $y = ${_argon2ffi.addIt(x, y)} --- ';
});
},
),
RaisedButton(
ElevatedButton(
child: Text('hash stuff'),
onPressed: () {
final args = Argon2Arguments(
utf8.encode('abc'),
utf8.encode('abc'),
utf8.encode('abc') as Uint8List,
utf8.encode('abc') as Uint8List,
1024,
2,
32,

59
example/pubspec.lock

@ -7,77 +7,70 @@ packages:
path: ".."
relative: true
source: path
version: "0.1.0"
version: "1.0.0"
argon2_ffi_base:
dependency: "direct main"
description:
name: argon2_ffi_base
url: "https://pub.dartlang.org"
source: hosted
version: "0.1.1"
version: "1.0.0+1"
async:
dependency: transitive
description:
name: async
url: "https://pub.dartlang.org"
source: hosted
version: "2.4.2"
version: "2.5.0"
boolean_selector:
dependency: transitive
description:
name: boolean_selector
url: "https://pub.dartlang.org"
source: hosted
version: "2.0.0"
version: "2.1.0"
characters:
dependency: transitive
description:
name: characters
url: "https://pub.dartlang.org"
source: hosted
version: "1.1.0-nullsafety"
version: "1.1.0"
charcode:
dependency: transitive
description:
name: charcode
url: "https://pub.dartlang.org"
source: hosted
version: "1.1.3"
version: "1.2.0"
clock:
dependency: transitive
description:
name: clock
url: "https://pub.dartlang.org"
source: hosted
version: "1.0.1"
version: "1.1.0"
collection:
dependency: transitive
description:
name: collection
url: "https://pub.dartlang.org"
source: hosted
version: "1.15.0-nullsafety"
version: "1.15.0"
fake_async:
dependency: transitive
description:
name: fake_async
url: "https://pub.dartlang.org"
source: hosted
version: "1.1.0"
version: "1.2.0"
ffi:
dependency: transitive
description:
name: ffi
url: "https://pub.dartlang.org"
source: hosted
version: "0.1.3"
ffi_helper:
dependency: transitive
description:
name: ffi_helper
url: "https://pub.dartlang.org"
source: hosted
version: "1.4.0"
version: "1.0.0"
flutter:
dependency: "direct main"
description: flutter
@ -88,27 +81,34 @@ packages:
description: flutter
source: sdk
version: "0.0.0"
logging:
dependency: transitive
description:
name: logging
url: "https://pub.dartlang.org"
source: hosted
version: "1.0.0"
matcher:
dependency: transitive
description:
name: matcher
url: "https://pub.dartlang.org"
source: hosted
version: "0.12.8"
version: "0.12.10"
meta:
dependency: transitive
description:
name: meta
url: "https://pub.dartlang.org"
source: hosted
version: "1.3.0-nullsafety"
version: "1.3.0"
path:
dependency: transitive
description:
name: path
url: "https://pub.dartlang.org"
source: hosted
version: "1.7.0"
version: "1.8.0"
sky_engine:
dependency: transitive
description: flutter
@ -120,55 +120,56 @@ packages:
name: source_span
url: "https://pub.dartlang.org"
source: hosted
version: "1.7.0"
version: "1.8.1"
stack_trace:
dependency: transitive
description:
name: stack_trace
url: "https://pub.dartlang.org"
source: hosted
version: "1.9.5"
version: "1.10.0"
stream_channel:
dependency: transitive
description:
name: stream_channel
url: "https://pub.dartlang.org"
source: hosted
version: "2.0.0"
version: "2.1.0"
string_scanner:
dependency: transitive
description:
name: string_scanner
url: "https://pub.dartlang.org"
source: hosted
version: "1.0.5"
version: "1.1.0"
term_glyph:
dependency: transitive
description:
name: term_glyph
url: "https://pub.dartlang.org"
source: hosted
version: "1.1.0"
version: "1.2.0"
test_api:
dependency: transitive
description:
name: test_api
url: "https://pub.dartlang.org"
source: hosted
version: "0.2.17"
version: "0.2.19"
typed_data:
dependency: transitive
description:
name: typed_data
url: "https://pub.dartlang.org"
source: hosted
version: "1.3.0-nullsafety"
version: "1.3.0"
vector_math:
dependency: transitive
description:
name: vector_math
url: "https://pub.dartlang.org"
source: hosted
version: "2.1.0-nullsafety"
version: "2.1.0"
sdks:
dart: ">=2.9.0-18.0 <2.9.0"
dart: ">=2.12.0 <3.0.0"
flutter: ">=1.10.0"

4
example/pubspec.yaml

@ -3,12 +3,12 @@ description: Demonstrates how to use the argon2_ffi plugin.
publish_to: 'none'
environment:
sdk: ">=2.1.0 <3.0.0"
sdk: '>=2.12.0 <3.0.0'
dependencies:
flutter:
sdk: flutter
argon2_ffi_base: '>=0.1.1 <1.0.0'
argon2_ffi_base: ^1.0.0+1
dev_dependencies:
flutter_test:

4
pubspec.lock

@ -7,7 +7,7 @@ packages:
name: argon2_ffi_base
url: "https://pub.dartlang.org"
source: hosted
version: "1.0.0"
version: "1.0.0+1"
async:
dependency: transitive
description:
@ -113,7 +113,7 @@ packages:
name: source_span
url: "https://pub.dartlang.org"
source: hosted
version: "1.8.0"
version: "1.8.1"
stack_trace:
dependency: transitive
description:

2
pubspec.yaml

@ -11,7 +11,7 @@ environment:
dependencies:
flutter:
sdk: flutter
argon2_ffi_base: ^1.0.0
argon2_ffi_base: ^1.0.0+1
dev_dependencies:

Loading…
Cancel
Save