From ad0d4f3b10f75ed97f9e5e6755be5b8b8d82b258 Mon Sep 17 00:00:00 2001
From: sh1l0n
Date: Wed, 26 Apr 2023 14:36:18 +0200
Subject: [PATCH 01/12] updated all dependencies
---
example/lib/about_page.dart | 2 +-
example/lib/disclaimer_page.dart | 2 +-
example/lib/exhibit_page.dart | 2 +-
example/lib/main.dart | 31 +-
example/lib/observation_page.dart | 5 +-
example/pubspec.lock | 380 +++++++++++-------
example/pubspec.yaml | 22 +-
faiabench/lib/fhir_resource_editor.dart | 28 +-
faiabench/lib/main.dart | 2 +-
faiabench/pubspec.yaml | 29 +-
.../lib/restful/src/smart_login_button.dart | 3 +-
.../lib/restful/src/sync_indicator.dart | 2 +-
faiadashu_online/pubspec.yaml | 14 +-
.../item/answer/src/coding_answer_filler.dart | 8 +-
.../answer/src/numerical_answer_filler.dart | 8 +-
.../view/item/src/total_score_item.dart | 4 +-
.../view/src/broken_questionnaire_item.dart | 11 +-
.../view/src/narrative_drawer.dart | 2 +-
.../view/src/narrative_page.dart | 4 +-
.../view/src/narrative_tile.dart | 4 +-
.../src/questionnaire_complete_button.dart | 3 +-
.../view/src/questionnaire_filler.dart | 7 +-
.../questionnaire_filler_progress_bar.dart | 4 +-
.../src/questionnaire_information_tile.dart | 5 +-
.../src/questionnaire_loading_indicator.dart | 7 +-
.../view/src/questionnaire_scroller_page.dart | 4 +-
.../view/src/questionnaire_stepper.dart | 7 +-
.../view/src/questionnaire_stepper_page.dart | 16 +-
.../view/src/questionnaire_theme.dart | 6 +-
lib/questionnaires/view/src/webview_html.dart | 15 +-
lib/questionnaires/view/src/webview_io.dart | 13 +-
lib/questionnaires/view/src/xhtml.dart | 2 +-
pubspec.yaml | 18 +-
33 files changed, 359 insertions(+), 311 deletions(-)
diff --git a/example/lib/about_page.dart b/example/lib/about_page.dart
index 45f8ef9b..0ae3f6d3 100644
--- a/example/lib/about_page.dart
+++ b/example/lib/about_page.dart
@@ -21,7 +21,7 @@ class AboutPage extends ExhibitPage {
I love the sound of it.
私はその音が大好きです。
''',
- defaultTextStyle: Theme.of(context).textTheme.bodyText1,
+ defaultTextStyle: Theme.of(context).textTheme.bodyLarge,
),
);
}
diff --git a/example/lib/disclaimer_page.dart b/example/lib/disclaimer_page.dart
index efba2cd5..a930e34c 100644
--- a/example/lib/disclaimer_page.dart
+++ b/example/lib/disclaimer_page.dart
@@ -3,7 +3,7 @@ import 'package:flutter/material.dart';
import 'exhibit_page.dart';
class DisclaimerPage extends ExhibitPage {
- const DisclaimerPage({Key? key}) : super(key: key);
+ const DisclaimerPage({super.key});
@override
Widget buildExhibit(BuildContext context) {
diff --git a/example/lib/exhibit_page.dart b/example/lib/exhibit_page.dart
index c52c4d26..a1166318 100644
--- a/example/lib/exhibit_page.dart
+++ b/example/lib/exhibit_page.dart
@@ -1,7 +1,7 @@
import 'package:flutter/material.dart';
abstract class ExhibitPage extends StatelessWidget {
- const ExhibitPage({Key? key}) : super(key: key);
+ const ExhibitPage({super.key});
String get title;
diff --git a/example/lib/main.dart b/example/lib/main.dart
index 1b0c333e..a8e9e112 100644
--- a/example/lib/main.dart
+++ b/example/lib/main.dart
@@ -44,7 +44,7 @@ void main() {
}
class MyApp extends StatelessWidget {
- const MyApp({Key? key}) : super(key: key);
+ const MyApp({super.key});
@override
Widget build(BuildContext context) {
@@ -71,7 +71,7 @@ class MyApp extends StatelessWidget {
}
class HomePage extends StatefulWidget {
- const HomePage({Key? key}) : super(key: key);
+ const HomePage({super.key});
@override
// ignore: library_private_types_in_public_api
@@ -123,7 +123,6 @@ class _HomePageState extends State {
clientId: '4564f6f7-335f-43d3-8867-a0f4e6f901d6',
redirectUri: FhirUri('com.legentix.faiagallery://callback'),
);
-
}
@override
@@ -134,7 +133,9 @@ class _HomePageState extends State {
/// Schedules repaint after login / logout.
void _onLoginChanged() {
- _logger.debug('_onLoginChanged: ${questionnaireResponseStorage.smartClient.isLoggedIn()}');
+ _logger.debug(
+ '_onLoginChanged: ${questionnaireResponseStorage.smartClient.isLoggedIn()}',
+ );
setState(() {
// Rebuild
});
@@ -171,7 +172,7 @@ class _HomePageState extends State {
title,
style: Theme.of(context)
.textTheme
- .headline6
+ .titleLarge
?.copyWith(fontWeight: FontWeight.bold),
),
Text(subtitle)
@@ -206,7 +207,10 @@ class _HomePageState extends State {
),
),
actions: [
- SmartLoginButton(questionnaireResponseStorage.smartClient, onLoginChanged: _onLoginChanged)
+ SmartLoginButton(
+ questionnaireResponseStorage.smartClient,
+ onLoginChanged: _onLoginChanged,
+ )
],
),
body: SafeArea(
@@ -225,7 +229,8 @@ class _HomePageState extends State {
launchContext: launchContext,
questionnairePath: 'assets/instruments/beverage_ig.json',
saveResponseFunction: questionnaireResponseStorage.saveToMemory,
- restoreResponseFunction: questionnaireResponseStorage.restoreFromMemory,
+ restoreResponseFunction:
+ questionnaireResponseStorage.restoreFromMemory,
uploadResponseFunction: uploadResponseFunction,
questionnaireModelDefaults: QuestionnaireModelDefaults(
prefixBuilder: (fim) {
@@ -369,7 +374,8 @@ class _HomePageState extends State {
launchContext: launchContext,
questionnairePath: 'assets/instruments/bluebook.json',
saveResponseFunction: questionnaireResponseStorage.saveToMemory,
- restoreResponseFunction: questionnaireResponseStorage.restoreFromMemory,
+ restoreResponseFunction:
+ questionnaireResponseStorage.restoreFromMemory,
uploadResponseFunction: uploadResponseFunction,
),
_launchQuestionnaire(
@@ -398,7 +404,8 @@ class _HomePageState extends State {
launchContext: launchContext,
questionnairePath: 'assets/instruments/argonaut_sampler.json',
saveResponseFunction: questionnaireResponseStorage.saveToMemory,
- restoreResponseFunction: questionnaireResponseStorage.restoreFromMemory,
+ restoreResponseFunction:
+ questionnaireResponseStorage.restoreFromMemory,
uploadResponseFunction: uploadResponseFunction,
),
QuestionnaireLaunchTile(
@@ -412,7 +419,8 @@ class _HomePageState extends State {
launchContext: launchContext,
questionnairePath: 'assets/instruments/argonaut_sampler.json',
saveResponseFunction: questionnaireResponseStorage.saveToMemory,
- restoreResponseFunction: questionnaireResponseStorage.restoreFromMemory,
+ restoreResponseFunction:
+ questionnaireResponseStorage.restoreFromMemory,
uploadResponseFunction: uploadResponseFunction,
),
QuestionnaireLaunchTile(
@@ -426,7 +434,8 @@ class _HomePageState extends State {
launchContext: launchContext,
questionnairePath: 'assets/instruments/argonaut_sampler.json',
saveResponseFunction: questionnaireResponseStorage.saveToMemory,
- restoreResponseFunction: questionnaireResponseStorage.restoreFromMemory,
+ restoreResponseFunction:
+ questionnaireResponseStorage.restoreFromMemory,
uploadResponseFunction: uploadResponseFunction,
),
_headline(
diff --git a/example/lib/observation_page.dart b/example/lib/observation_page.dart
index c103a23d..535e4cf6 100644
--- a/example/lib/observation_page.dart
+++ b/example/lib/observation_page.dart
@@ -4,7 +4,7 @@ import 'package:fhir/r4.dart';
import 'package:flutter/material.dart';
class ObservationPage extends ExhibitPage {
- ObservationPage({Key? key}) : super(key: key);
+ ObservationPage({super.key});
final bpObservation = Observation(
effectiveDateTime: FhirDateTime(DateTime.now()),
@@ -124,7 +124,8 @@ class ObservationPage extends ExhibitPage {
valueStyle: Theme.of(context).textTheme.headline4,
codeStyle: Theme.of(context).textTheme.subtitle2,
dateTimeStyle: Theme.of(context).textTheme.caption,
- locale: const Locale.fromSubtags(languageCode: 'ar', countryCode: 'BH'),
+ locale:
+ const Locale.fromSubtags(languageCode: 'ar', countryCode: 'BH'),
),
],
);
diff --git a/example/pubspec.lock b/example/pubspec.lock
index d6462bd3..fd61879d 100644
--- a/example/pubspec.lock
+++ b/example/pubspec.lock
@@ -5,49 +5,56 @@ packages:
dependency: transitive
description:
name: args
- url: "https://pub.dartlang.org"
+ sha256: "4cab82a83ffef80b262ddedf47a0a8e56ee6fbf7fe21e6e768b02792034dd440"
+ url: "https://pub.dev"
source: hosted
- version: "2.3.1"
+ version: "2.4.0"
async:
dependency: transitive
description:
name: async
- url: "https://pub.dartlang.org"
+ sha256: "947bfcf187f74dbc5e146c9eb9c0f10c9f8b30743e341481c1e2ed3ecc18c20c"
+ url: "https://pub.dev"
source: hosted
- version: "2.9.0"
- characters:
+ version: "2.11.0"
+ boolean_selector:
dependency: transitive
description:
- name: characters
- url: "https://pub.dartlang.org"
+ name: boolean_selector
+ sha256: "6cfb5af12253eaf2b368f07bacc5a80d1301a071c73360d746b7f2e32d762c66"
+ url: "https://pub.dev"
source: hosted
- version: "1.2.0"
- charcode:
+ version: "2.1.1"
+ characters:
dependency: transitive
description:
- name: charcode
- url: "https://pub.dartlang.org"
+ name: characters
+ sha256: e6a326c8af69605aec75ed6c187d06b349707a27fbff8222ca9cc2cff167975c
+ url: "https://pub.dev"
source: hosted
- version: "1.3.1"
+ version: "1.2.1"
clock:
dependency: transitive
description:
name: clock
- url: "https://pub.dartlang.org"
+ sha256: cb6d7f03e1de671e34607e909a7213e31d7752be4fb66a86d29fe1eb14bfb5cf
+ url: "https://pub.dev"
source: hosted
- version: "1.1.0"
+ version: "1.1.1"
collection:
dependency: "direct main"
description:
name: collection
- url: "https://pub.dartlang.org"
+ sha256: cfc915e6923fe5ce6e153b0723c753045de46de1b4d63771530504004a45fae0
+ url: "https://pub.dev"
source: hosted
- version: "1.16.0"
+ version: "1.17.0"
crypto:
dependency: transitive
description:
name: crypto
- url: "https://pub.dartlang.org"
+ sha256: aa274aa7774f8964e4f4f38cc994db7b6158dd36e9187aaceaddc994b35c6c67
+ url: "https://pub.dev"
source: hosted
version: "3.0.2"
faiadashu:
@@ -68,51 +75,58 @@ packages:
dependency: transitive
description:
name: ffi
- url: "https://pub.dartlang.org"
+ sha256: a38574032c5f1dd06c4aee541789906c12ccaab8ba01446e800d9c5b79c4a978
+ url: "https://pub.dev"
source: hosted
- version: "2.0.0"
+ version: "2.0.1"
fhir:
dependency: "direct main"
description:
name: fhir
- url: "https://pub.dartlang.org"
+ sha256: d255189e3314e6b67654d8cba448460d019532eff654191f374b8709bc4185bd
+ url: "https://pub.dev"
source: hosted
version: "0.8.0"
fhir_at_rest:
dependency: transitive
description:
name: fhir_at_rest
- url: "https://pub.dartlang.org"
+ sha256: "3b6915b9d95c48fa6369c12fdc9430d51f4644a3d48c76caad9c51126d39ed75"
+ url: "https://pub.dev"
source: hosted
- version: "0.8.3"
+ version: "0.8.4"
fhir_auth:
dependency: "direct main"
description:
name: fhir_auth
- url: "https://pub.dartlang.org"
+ sha256: "5081e5fba81812c7d47768be5b096dbb9787cdd59a742e2272700687d6ac067c"
+ url: "https://pub.dev"
source: hosted
version: "0.8.0"
fhir_path:
dependency: transitive
description:
name: fhir_path
- url: "https://pub.dartlang.org"
+ sha256: eef12419e4e62feb51176b6c5f4038980cb0140eb79ec67f92dd000e2d589cda
+ url: "https://pub.dev"
source: hosted
version: "0.8.0"
fhir_yaml:
dependency: transitive
description:
name: fhir_yaml
- url: "https://pub.dartlang.org"
+ sha256: "59aad5ead24d602142aa2e5745596fe7ef1472496ef29ea3ce3283f3c917c964"
+ url: "https://pub.dev"
source: hosted
version: "0.8.0"
file:
dependency: transitive
description:
name: file
- url: "https://pub.dartlang.org"
+ sha256: "1b92bec4fc2a72f59a8e15af5f52cd441e4a7860b49499d69dfa817af20e925d"
+ url: "https://pub.dev"
source: hosted
- version: "6.1.2"
+ version: "6.1.4"
flutter:
dependency: "direct main"
description: flutter
@@ -127,9 +141,10 @@ packages:
dependency: transitive
description:
name: flutter_web_auth
- url: "https://pub.dartlang.org"
+ sha256: "8c364d8157b299c95f062bbd7bf428bb80c272d7ed3b8f0e6c7028e037e82c76"
+ url: "https://pub.dev"
source: hosted
- version: "0.4.1"
+ version: "0.4.3"
flutter_web_plugins:
dependency: transitive
description: flutter
@@ -139,247 +154,274 @@ packages:
dependency: transitive
description:
name: freezed_annotation
- url: "https://pub.dartlang.org"
+ sha256: aeac15850ef1b38ee368d4c53ba9a847e900bb2c53a4db3f6881cbb3cb684338
+ url: "https://pub.dev"
source: hosted
- version: "2.0.3"
+ version: "2.2.0"
google_fonts:
dependency: "direct main"
description:
name: google_fonts
- url: "https://pub.dartlang.org"
+ sha256: e70521755a6b08c6bde14ddae27dff5bf21010033888fc61da6c595f8a9f58c1
+ url: "https://pub.dev"
source: hosted
version: "2.3.3"
google_sign_in:
dependency: transitive
description:
name: google_sign_in
- url: "https://pub.dartlang.org"
+ sha256: "821f354c053d51a2d417b02d42532a19a6ea8057d2f9ebb8863c07d81c98aaf9"
+ url: "https://pub.dev"
source: hosted
- version: "5.3.2"
+ version: "5.4.4"
google_sign_in_android:
dependency: transitive
description:
name: google_sign_in_android
- url: "https://pub.dartlang.org"
+ sha256: "8e46e791f54ce83c05dcc41430bba943c3aafc49b9b867c4d10b395968398b4a"
+ url: "https://pub.dev"
source: hosted
- version: "5.2.8"
+ version: "6.1.11"
google_sign_in_ios:
dependency: transitive
description:
name: google_sign_in_ios
- url: "https://pub.dartlang.org"
+ sha256: "2e1df687b17f7fddcaf9a0c7f994d0d19b5d41e8ce1d943013befd0a0ae67403"
+ url: "https://pub.dev"
source: hosted
- version: "5.3.1"
+ version: "5.6.1"
google_sign_in_platform_interface:
dependency: transitive
description:
name: google_sign_in_platform_interface
- url: "https://pub.dartlang.org"
+ sha256: "95a9e0a8701b5485f2ca330fd1fc6f918f5ce088042ce1019c5e389d8574ae4c"
+ url: "https://pub.dev"
source: hosted
- version: "2.1.3"
+ version: "2.4.0"
google_sign_in_web:
dependency: transitive
description:
name: google_sign_in_web
- url: "https://pub.dartlang.org"
+ sha256: "75cc41ebc53b1756320ee14d9c3018ad3e6cea298147dbcd86e9d0c8d6720b40"
+ url: "https://pub.dev"
source: hosted
- version: "0.10.1+2"
+ version: "0.10.2+1"
html_unescape:
dependency: transitive
description:
name: html_unescape
- url: "https://pub.dartlang.org"
+ sha256: "15362d7a18f19d7b742ef8dcb811f5fd2a2df98db9f80ea393c075189e0b61e3"
+ url: "https://pub.dev"
source: hosted
version: "2.0.0"
http:
dependency: transitive
description:
name: http
- url: "https://pub.dartlang.org"
+ sha256: "6aa2946395183537c8b880962d935877325d6a09a2867c3970c05c0fed6ac482"
+ url: "https://pub.dev"
source: hosted
- version: "0.13.4"
+ version: "0.13.5"
http_parser:
dependency: transitive
description:
name: http_parser
- url: "https://pub.dartlang.org"
+ sha256: "2aa08ce0341cc9b354a498388e30986515406668dbcc4f7c950c3e715496693b"
+ url: "https://pub.dev"
source: hosted
- version: "4.0.1"
+ version: "4.0.2"
intl:
dependency: "direct main"
description:
name: intl
- url: "https://pub.dartlang.org"
+ sha256: "910f85bce16fb5c6f614e117efa303e85a1731bb0081edf3604a2ae6e9a3cc91"
+ url: "https://pub.dev"
source: hosted
version: "0.17.0"
js:
dependency: transitive
description:
name: js
- url: "https://pub.dartlang.org"
+ sha256: "5528c2f391ededb7775ec1daa69e65a2d61276f7552de2b5f7b8d34ee9fd4ab7"
+ url: "https://pub.dev"
source: hosted
- version: "0.6.4"
+ version: "0.6.5"
json_annotation:
dependency: transitive
description:
name: json_annotation
- url: "https://pub.dartlang.org"
+ sha256: c33da08e136c3df0190bd5bbe51ae1df4a7d96e7954d1d7249fea2968a72d317
+ url: "https://pub.dev"
source: hosted
- version: "4.5.0"
+ version: "4.8.0"
lint:
dependency: "direct dev"
description:
name: lint
- url: "https://pub.dartlang.org"
+ sha256: "3e9343b1cededcfb1e8b40d0dbd3592b7a1c6c0121545663a991433390c2bc97"
+ url: "https://pub.dev"
source: hosted
- version: "1.8.2"
+ version: "2.0.1"
logging:
dependency: "direct main"
description:
name: logging
- url: "https://pub.dartlang.org"
+ sha256: "04094f2eb032cbb06c6f6e8d3607edcfcb0455e2bb6cbc010cb01171dcb64e6d"
+ url: "https://pub.dev"
source: hosted
- version: "1.0.2"
+ version: "1.1.1"
markdown:
dependency: transitive
description:
name: markdown
- url: "https://pub.dartlang.org"
+ sha256: d95a9d12954aafc97f984ca29baaa7690ed4d9ec4140a23ad40580bcdb6c87f5
+ url: "https://pub.dev"
source: hosted
- version: "5.0.0"
+ version: "7.0.2"
matcher:
dependency: transitive
description:
name: matcher
- url: "https://pub.dartlang.org"
+ sha256: "6501fbd55da300384b768785b83e5ce66991266cec21af89ab9ae7f5ce1c4cbb"
+ url: "https://pub.dev"
source: hosted
- version: "0.12.11"
+ version: "0.12.15"
material_color_utilities:
dependency: transitive
description:
name: material_color_utilities
- url: "https://pub.dartlang.org"
+ sha256: d92141dc6fe1dad30722f9aa826c7fbc896d021d792f80678280601aff8cf724
+ url: "https://pub.dev"
source: hosted
- version: "0.1.4"
+ version: "0.2.0"
meta:
dependency: transitive
description:
name: meta
- url: "https://pub.dartlang.org"
+ sha256: "6c268b42ed578a53088d834796959e4a1814b5e9e164f147f580a386e5decf42"
+ url: "https://pub.dev"
source: hosted
- version: "1.7.0"
+ version: "1.8.0"
oauth2:
dependency: transitive
description:
name: oauth2
- url: "https://pub.dartlang.org"
+ sha256: "1e8376c222651904caf7785fd2fa01b1e2be608c94bec842a94e116deca88f13"
+ url: "https://pub.dev"
source: hosted
- version: "2.0.0"
+ version: "2.0.1"
path:
dependency: transitive
description:
name: path
- url: "https://pub.dartlang.org"
+ sha256: db9d4f58c908a4ba5953fcee2ae317c94889433e5024c27ce74a37f94267945b
+ url: "https://pub.dev"
source: hosted
- version: "1.8.1"
+ version: "1.8.2"
path_provider:
dependency: transitive
description:
name: path_provider
- url: "https://pub.dartlang.org"
+ sha256: c7edf82217d4b2952b2129a61d3ad60f1075b9299e629e149a8d2e39c2e6aad4
+ url: "https://pub.dev"
source: hosted
- version: "2.0.10"
+ version: "2.0.14"
path_provider_android:
dependency: transitive
description:
name: path_provider_android
- url: "https://pub.dartlang.org"
+ sha256: da97262be945a72270513700a92b39dd2f4a54dad55d061687e2e37a6390366a
+ url: "https://pub.dev"
source: hosted
- version: "2.0.14"
- path_provider_ios:
+ version: "2.0.25"
+ path_provider_foundation:
dependency: transitive
description:
- name: path_provider_ios
- url: "https://pub.dartlang.org"
+ name: path_provider_foundation
+ sha256: ad4c4d011830462633f03eb34445a45345673dfd4faf1ab0b4735fbd93b19183
+ url: "https://pub.dev"
source: hosted
- version: "2.0.9"
+ version: "2.2.2"
path_provider_linux:
dependency: transitive
description:
name: path_provider_linux
- url: "https://pub.dartlang.org"
+ sha256: "2ae08f2216225427e64ad224a24354221c2c7907e448e6e0e8b57b1eb9f10ad1"
+ url: "https://pub.dev"
source: hosted
- version: "2.1.7"
- path_provider_macos:
- dependency: transitive
- description:
- name: path_provider_macos
- url: "https://pub.dartlang.org"
- source: hosted
- version: "2.0.6"
+ version: "2.1.10"
path_provider_platform_interface:
dependency: transitive
description:
name: path_provider_platform_interface
- url: "https://pub.dartlang.org"
+ sha256: "57585299a729335f1298b43245842678cb9f43a6310351b18fb577d6e33165ec"
+ url: "https://pub.dev"
source: hosted
- version: "2.0.4"
+ version: "2.0.6"
path_provider_windows:
dependency: transitive
description:
name: path_provider_windows
- url: "https://pub.dartlang.org"
+ sha256: d3f80b32e83ec208ac95253e0cd4d298e104fbc63cb29c5c69edaed43b0c69d6
+ url: "https://pub.dev"
source: hosted
- version: "2.1.0"
+ version: "2.1.6"
petitparser:
dependency: transitive
description:
name: petitparser
- url: "https://pub.dartlang.org"
+ sha256: "49392a45ced973e8d94a85fdb21293fbb40ba805fc49f2965101ae748a3683b4"
+ url: "https://pub.dev"
source: hosted
- version: "5.0.0"
+ version: "5.1.0"
platform:
dependency: transitive
description:
name: platform
- url: "https://pub.dartlang.org"
+ sha256: "4a451831508d7d6ca779f7ac6e212b4023dd5a7d08a27a63da33756410e32b76"
+ url: "https://pub.dev"
source: hosted
version: "3.1.0"
plugin_platform_interface:
dependency: transitive
description:
name: plugin_platform_interface
- url: "https://pub.dartlang.org"
+ sha256: "6a2128648c854906c53fa8e33986fc0247a1116122f9534dd20e3ab9e16a32bc"
+ url: "https://pub.dev"
source: hosted
- version: "2.1.2"
+ version: "2.1.4"
process:
dependency: transitive
description:
name: process
- url: "https://pub.dartlang.org"
+ sha256: "53fd8db9cec1d37b0574e12f07520d582019cb6c44abf5479a01505099a34a09"
+ url: "https://pub.dev"
source: hosted
version: "4.2.4"
quiver:
dependency: transitive
description:
name: quiver
- url: "https://pub.dartlang.org"
+ sha256: b1c1ac5ce6688d77f65f3375a9abb9319b3cb32486bdc7a1e0fdf004d7ba4e47
+ url: "https://pub.dev"
source: hosted
- version: "3.1.0"
+ version: "3.2.1"
scrollable_positioned_list:
dependency: transitive
description:
name: scrollable_positioned_list
- url: "https://pub.dartlang.org"
+ sha256: ca7fcaa743db712d4f7b1580526f494d0093c77a721a65705ee51fbeac7a2bd3
+ url: "https://pub.dev"
source: hosted
- version: "0.3.2"
+ version: "0.3.5"
simple_html_css:
dependency: "direct main"
description:
name: simple_html_css
- url: "https://pub.dartlang.org"
+ sha256: af730b15c0b37c97a14b6aeceabe68128855c4630dc500030f3c3e176e8fc57f
+ url: "https://pub.dev"
source: hosted
- version: "3.0.1+1"
+ version: "4.0.0"
sky_engine:
dependency: transitive
description: flutter
@@ -389,170 +431,210 @@ packages:
dependency: transitive
description:
name: source_span
- url: "https://pub.dartlang.org"
+ sha256: "53e943d4206a5e30df338fd4c6e7a077e02254531b138a15aec3bd143c1a8b3c"
+ url: "https://pub.dev"
source: hosted
- version: "1.9.0"
+ version: "1.10.0"
stack_trace:
dependency: transitive
description:
name: stack_trace
- url: "https://pub.dartlang.org"
+ sha256: c3c7d8edb15bee7f0f74debd4b9c5f3c2ea86766fe4178eb2a18eb30a0bdaed5
+ url: "https://pub.dev"
source: hosted
- version: "1.10.0"
+ version: "1.11.0"
+ stream_channel:
+ dependency: transitive
+ description:
+ name: stream_channel
+ sha256: "83615bee9045c1d322bbbd1ba209b7a749c2cbcdcb3fdd1df8eb488b3279c1c8"
+ url: "https://pub.dev"
+ source: hosted
+ version: "2.1.1"
string_scanner:
dependency: transitive
description:
name: string_scanner
- url: "https://pub.dartlang.org"
+ sha256: "556692adab6cfa87322a115640c11f13cb77b3f076ddcc5d6ae3c20242bedcde"
+ url: "https://pub.dev"
source: hosted
- version: "1.1.1"
+ version: "1.2.0"
term_glyph:
dependency: transitive
description:
name: term_glyph
- url: "https://pub.dartlang.org"
+ sha256: a29248a84fbb7c79282b40b8c72a1209db169a2e0542bce341da992fe1bc7e84
+ url: "https://pub.dev"
source: hosted
- version: "1.2.0"
+ version: "1.2.1"
+ test_api:
+ dependency: transitive
+ description:
+ name: test_api
+ sha256: daadc9baabec998b062c9091525aa95786508b1c48e9c30f1f891b8bf6ff2e64
+ url: "https://pub.dev"
+ source: hosted
+ version: "0.5.2"
typed_data:
dependency: transitive
description:
name: typed_data
- url: "https://pub.dartlang.org"
+ sha256: "26f87ade979c47a150c9eaab93ccd2bebe70a27dc0b4b29517f2904f04eb11a5"
+ url: "https://pub.dev"
source: hosted
version: "1.3.1"
url_launcher:
dependency: transitive
description:
name: url_launcher
- url: "https://pub.dartlang.org"
+ sha256: "75f2846facd11168d007529d6cd8fcb2b750186bea046af9711f10b907e1587e"
+ url: "https://pub.dev"
source: hosted
- version: "6.1.2"
+ version: "6.1.10"
url_launcher_android:
dependency: transitive
description:
name: url_launcher_android
- url: "https://pub.dartlang.org"
+ sha256: a52628068d282d01a07cd86e6ba99e497aa45ce8c91159015b2416907d78e411
+ url: "https://pub.dev"
source: hosted
- version: "6.0.17"
+ version: "6.0.27"
url_launcher_ios:
dependency: transitive
description:
name: url_launcher_ios
- url: "https://pub.dartlang.org"
+ sha256: "9af7ea73259886b92199f9e42c116072f05ff9bea2dcb339ab935dfc957392c2"
+ url: "https://pub.dev"
source: hosted
- version: "6.0.17"
+ version: "6.1.4"
url_launcher_linux:
dependency: transitive
description:
name: url_launcher_linux
- url: "https://pub.dartlang.org"
+ sha256: "206fb8334a700ef7754d6a9ed119e7349bc830448098f21a69bf1b4ed038cabc"
+ url: "https://pub.dev"
source: hosted
- version: "3.0.1"
+ version: "3.0.4"
url_launcher_macos:
dependency: transitive
description:
name: url_launcher_macos
- url: "https://pub.dartlang.org"
+ sha256: "91ee3e75ea9dadf38036200c5d3743518f4a5eb77a8d13fda1ee5764373f185e"
+ url: "https://pub.dev"
source: hosted
- version: "3.0.1"
+ version: "3.0.5"
url_launcher_platform_interface:
dependency: transitive
description:
name: url_launcher_platform_interface
- url: "https://pub.dartlang.org"
+ sha256: "6c9ca697a5ae218ce56cece69d46128169a58aa8653c1b01d26fcd4aad8c4370"
+ url: "https://pub.dev"
source: hosted
- version: "2.0.5"
+ version: "2.1.2"
url_launcher_web:
dependency: transitive
description:
name: url_launcher_web
- url: "https://pub.dartlang.org"
+ sha256: "81fe91b6c4f84f222d186a9d23c73157dc4c8e1c71489c4d08be1ad3b228f1aa"
+ url: "https://pub.dev"
source: hosted
- version: "2.0.11"
+ version: "2.0.16"
url_launcher_windows:
dependency: transitive
description:
name: url_launcher_windows
- url: "https://pub.dartlang.org"
+ sha256: a83ba3607a507758669cfafb03f9de09bf6e6280c14d9b9cb18f013e406dcacd
+ url: "https://pub.dev"
source: hosted
- version: "3.0.1"
+ version: "3.0.5"
uuid:
dependency: transitive
description:
name: uuid
- url: "https://pub.dartlang.org"
+ sha256: "648e103079f7c64a36dc7d39369cabb358d377078a051d6ae2ad3aa539519313"
+ url: "https://pub.dev"
source: hosted
- version: "3.0.6"
+ version: "3.0.7"
vector_math:
dependency: transitive
description:
name: vector_math
- url: "https://pub.dartlang.org"
+ sha256: "80b3257d1492ce4d091729e3a67a60407d227c27241d6927be0130c98e741803"
+ url: "https://pub.dev"
source: hosted
- version: "2.1.2"
+ version: "2.1.4"
webview_flutter:
dependency: transitive
description:
name: webview_flutter
- url: "https://pub.dartlang.org"
+ sha256: "1a37bdbaaf5fbe09ad8579ab09ecfd473284ce482f900b5aea27cf834386a567"
+ url: "https://pub.dev"
source: hosted
- version: "3.0.4"
+ version: "4.2.0"
webview_flutter_android:
dependency: transitive
description:
name: webview_flutter_android
- url: "https://pub.dartlang.org"
+ sha256: "134ed5d36127b6f5865e86a82174886eae0b983dacd8df14b0448371debde755"
+ url: "https://pub.dev"
source: hosted
- version: "2.8.9"
+ version: "3.6.0"
webview_flutter_platform_interface:
dependency: transitive
description:
name: webview_flutter_platform_interface
- url: "https://pub.dartlang.org"
+ sha256: "78715dc442b7849dbde74e92bb67de1cecf5addf95531c5fb474e72f5fe9a507"
+ url: "https://pub.dev"
source: hosted
- version: "1.9.1"
+ version: "2.3.0"
webview_flutter_web:
dependency: transitive
description:
name: webview_flutter_web
- url: "https://pub.dartlang.org"
+ sha256: "78494dd1be4b5b3070140cbdcc138b9736aa4619f00643f909da6d54f0ffc141"
+ url: "https://pub.dev"
source: hosted
- version: "0.1.0+3"
+ version: "0.2.2+1"
webview_flutter_wkwebview:
dependency: transitive
description:
name: webview_flutter_wkwebview
- url: "https://pub.dartlang.org"
+ sha256: c94d242d8cbe1012c06ba7ac790c46d6e6b68723b7d34f8c74ed19f68d166f49
+ url: "https://pub.dev"
source: hosted
- version: "2.8.1"
+ version: "3.4.0"
win32:
dependency: transitive
description:
name: win32
- url: "https://pub.dartlang.org"
+ sha256: dd8f9344bc305ae2923e3d11a2a911d9a4e2c7dd6fe0ed10626d63211a69676e
+ url: "https://pub.dev"
source: hosted
- version: "2.7.0"
+ version: "4.1.3"
xdg_directories:
dependency: transitive
description:
name: xdg_directories
- url: "https://pub.dartlang.org"
+ sha256: ee1505df1426458f7f60aac270645098d318a8b4766d85fde75f76f2e21807d1
+ url: "https://pub.dev"
source: hosted
- version: "0.2.0+1"
+ version: "1.0.0"
xml:
dependency: transitive
description:
name: xml
- url: "https://pub.dartlang.org"
+ sha256: "979ee37d622dec6365e2efa4d906c37470995871fe9ae080d967e192d88286b5"
+ url: "https://pub.dev"
source: hosted
- version: "5.4.1"
+ version: "6.2.2"
yaml:
dependency: transitive
description:
name: yaml
- url: "https://pub.dartlang.org"
+ sha256: "23812a9b125b48d4007117254bca50abb6c712352927eece9e155207b1db2370"
+ url: "https://pub.dev"
source: hosted
version: "3.1.1"
sdks:
- dart: ">=2.17.0 <3.0.0"
- flutter: ">=3.0.0"
+ dart: ">=2.19.0 <3.0.0"
+ flutter: ">=3.3.0"
diff --git a/example/pubspec.yaml b/example/pubspec.yaml
index bbb21772..5bcaead4 100644
--- a/example/pubspec.yaml
+++ b/example/pubspec.yaml
@@ -2,42 +2,28 @@ name: faiadashu_example
description: Gallery app for Faiadashu™
environment:
- sdk: '>=2.17.0 <3.0.0'
+ sdk: '>=2.18.4 <3.0.0'
flutter: '>=3.0.0'
dependencies:
- collection: ^1.16.0
-
+ collection: ^1.17.0
faiadashu:
path: ..
-
faiadashu_online:
path: ../faiadashu_online
-
fhir: ^0.8.0
-# fhir:
-# path: /Users/tilo/Projects/fhir/fhir
-
fhir_auth: ^0.8.0
-# fhir_auth:
-# path: ../../fhir/fhir_auth
-
flutter:
sdk: flutter
flutter_localizations:
sdk: flutter
-
google_fonts: ^2.1.1
-
intl: ^0.17.0
-
logging: ^1.0.2
-
- simple_html_css: ^3.0.1+1
+ simple_html_css: ^4.0.0
dev_dependencies:
- lint: ^1.8.2
-
+ lint: ^2.0.1
flutter:
uses-material-design: true
diff --git a/faiabench/lib/fhir_resource_editor.dart b/faiabench/lib/fhir_resource_editor.dart
index fc39e1b2..1b631b63 100644
--- a/faiabench/lib/fhir_resource_editor.dart
+++ b/faiabench/lib/fhir_resource_editor.dart
@@ -6,8 +6,6 @@ import 'package:faiabench/fhir_resource_notifier.dart';
import 'package:fhir_path/fhir_path.dart';
import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
-import 'package:flutter_highlight/themes/github.dart';
-import 'package:flutter_highlight/themes/monokai-sublime.dart';
import 'package:flutter_riverpod/flutter_riverpod.dart';
import 'package:highlight/languages/javascript.dart';
import 'package:highlight/languages/json.dart';
@@ -29,8 +27,8 @@ class FhirResourceEditor extends ConsumerStatefulWidget {
this.showFhirPath = true,
this.fhirPathOutputMinLines = 3,
this.fhirPathOutputMaxLines = 3,
- Key? key,
- }) : super(key: key);
+ super.key,
+ });
@override
// ignore: library_private_types_in_public_api
@@ -45,11 +43,12 @@ class _FhirResourceEditorState extends ConsumerState {
bool _fhirPathVisible = false;
- void _fhirPathChanged(String newPath) {
+ void _fhirPathChanged() {
+ final newPath = _fhirPathController?.text ?? '';
setState(() {
try {
final jsonContext =
- jsonDecode(_codeController!.rawText) as Map;
+ jsonDecode(_codeController!.text) as Map;
final pathResult =
walkFhirPath(context: jsonContext, pathExpression: newPath);
const encoder = JsonEncoder.withIndent(' ');
@@ -69,26 +68,24 @@ class _FhirResourceEditorState extends ConsumerState {
_codeController = CodeController(
text: '',
language: json,
- theme: monokaiSublimeTheme,
);
_fhirPathController = CodeController(
text: '',
language: javascript,
- theme: githubTheme,
- onChange: _fhirPathChanged,
);
+ _fhirPathController?.addListener(_fhirPathChanged);
_fhirPathOutputController = CodeController(
text: '',
language: json,
- theme: githubTheme,
);
}
@override
void dispose() {
_codeController?.dispose();
+ _fhirPathController?.removeListener(_fhirPathChanged);
_fhirPathController?.dispose();
_fhirPathOutputController?.dispose();
_scrollController?.dispose();
@@ -126,9 +123,9 @@ class _FhirResourceEditorState extends ConsumerState {
height: 120,
child: Stack(
children: [
- Container(
+ const ColoredBox(
color: Colors.black54,
- child: const SizedBox.expand(),
+ child: SizedBox.expand(),
),
Column(
mainAxisSize: MainAxisSize.min,
@@ -155,7 +152,7 @@ class _FhirResourceEditorState extends ConsumerState {
onPressed: () async {
await Clipboard.setData(
ClipboardData(
- text: codeController.rawText.trim(),
+ text: codeController.text.trim(),
),
);
@@ -218,7 +215,7 @@ class _FhirResourceEditorState extends ConsumerState {
if (widget.showSubmitButton)
IconButton(
onPressed: () {
- final rawText = codeController.rawText.trim();
+ final rawText = codeController.text.trim();
final fhirResource = (rawText.isNotEmpty)
? FhirResource.fromJsonString(rawText)
@@ -227,7 +224,8 @@ class _FhirResourceEditorState extends ConsumerState {
if (fhirResource.hasError) {
ScaffoldMessenger.of(context).showSnackBar(
SnackBar(
- backgroundColor: Theme.of(context).errorColor,
+ backgroundColor:
+ Theme.of(context).colorScheme.error,
content: Text(fhirResource.errorMessage!),
),
);
diff --git a/faiabench/lib/main.dart b/faiabench/lib/main.dart
index 7eb88149..27c1b9fb 100644
--- a/faiabench/lib/main.dart
+++ b/faiabench/lib/main.dart
@@ -129,7 +129,7 @@ class MyApp extends StatelessWidget {
}
class HomePage extends ConsumerStatefulWidget {
- const HomePage({Key? key}) : super(key: key);
+ const HomePage({super.key});
@override
// ignore: library_private_types_in_public_api
diff --git a/faiabench/pubspec.yaml b/faiabench/pubspec.yaml
index ef6a11d4..b6034e86 100644
--- a/faiabench/pubspec.yaml
+++ b/faiabench/pubspec.yaml
@@ -18,47 +18,30 @@ publish_to: 'none' # Remove this line if you wish to publish to pub.dev
version: 1.1.0
environment:
- sdk: '>=2.17.0 <3.0.0'
+ sdk: '>=2.18.4 <3.0.0'
flutter: '>=3.0.0'
dependencies:
- code_text_field: ^1.0.2
-
- collection: ^1.16.0
-
+ code_text_field: ^1.1.0
+ collection: ^1.17.0
faiadashu:
path: ..
-
fhir: ^0.8.0
-
fhir_path: ^0.8.0
-# fhir_path:
-# path: ../../fhir/fhir_path
-
flutter:
sdk: flutter
-
flutter_highlight: ^0.7.0
-
flutter_localizations:
sdk: flutter
-
- flutter_riverpod: ^1.0.1
-
+ flutter_riverpod: ^2.3.0
highlight: ^0.7.0
-
intl: ^0.17.0
-
logging: ^1.0.1
-
multi_split_view: ^2.0.0
-
- simple_html_css: ^3.0.1+1
-
-
+ simple_html_css: ^4.0.0
dev_dependencies:
- lint: ^1.8.2
+ lint: ^2.0.1
flutter:
uses-material-design: true
diff --git a/faiadashu_online/lib/restful/src/smart_login_button.dart b/faiadashu_online/lib/restful/src/smart_login_button.dart
index 74cb8af3..fb73c8b1 100644
--- a/faiadashu_online/lib/restful/src/smart_login_button.dart
+++ b/faiadashu_online/lib/restful/src/smart_login_button.dart
@@ -9,8 +9,7 @@ class SmartLoginButton extends StatefulWidget {
final SmartFhirClient client;
final VoidCallback? onLoginChanged;
- const SmartLoginButton(this.client, {this.onLoginChanged, Key? key})
- : super(key: key);
+ const SmartLoginButton(this.client, {this.onLoginChanged, super.key});
@override
// ignore: library_private_types_in_public_api
diff --git a/faiadashu_online/lib/restful/src/sync_indicator.dart b/faiadashu_online/lib/restful/src/sync_indicator.dart
index aadd4584..df1224e1 100644
--- a/faiadashu_online/lib/restful/src/sync_indicator.dart
+++ b/faiadashu_online/lib/restful/src/sync_indicator.dart
@@ -6,7 +6,7 @@ import 'package:flutter/material.dart';
class SyncIndicator extends StatefulWidget {
final Color? color;
- const SyncIndicator({this.color, Key? key}) : super(key: key);
+ const SyncIndicator({this.color, super.key});
@override
// ignore: library_private_types_in_public_api
diff --git a/faiadashu_online/pubspec.yaml b/faiadashu_online/pubspec.yaml
index 083ff27a..dc71e9a3 100644
--- a/faiadashu_online/pubspec.yaml
+++ b/faiadashu_online/pubspec.yaml
@@ -11,32 +11,24 @@ repository: https://github.com/tiloc/faiadashu
issue_tracker: https://github.com/tiloc/faiadashu/issues
environment:
- sdk: '>=2.16.0 <3.0.0'
+ sdk: '>=2.18.4 <3.0.0'
flutter: '>=2.10.0'
dependencies:
faiadashu:
path: ..
-
fhir: ^0.8.0
-
- fhir_at_rest: ^0.8.3
-
+ fhir_at_rest: ^0.8.0
fhir_auth: ^0.8.0
-# fhir_auth:
-# path: ../../fhir/fhir_auth
-
flutter:
sdk: flutter
logging: ^1.0.2
-
url_launcher: ^6.0.20
dev_dependencies:
flutter_test:
sdk: flutter
-
- lint: ^1.8.2
+ lint: ^2.0.1
# For information on the generic Dart part of this file, see the
# following page: https://dart.dev/tools/pub/pubspec
diff --git a/lib/questionnaires/view/item/answer/src/coding_answer_filler.dart b/lib/questionnaires/view/item/answer/src/coding_answer_filler.dart
index 9acec3a1..dec0d7f7 100644
--- a/lib/questionnaires/view/item/answer/src/coding_answer_filler.dart
+++ b/lib/questionnaires/view/item/answer/src/coding_answer_filler.dart
@@ -56,8 +56,8 @@ class _CodingInputControl extends AnswerInputControl {
errorText ?? '',
style: Theme.of(context)
.textTheme
- .caption
- ?.copyWith(color: Theme.of(context).errorColor),
+ .bodySmall
+ ?.copyWith(color: Theme.of(context).colorScheme.error),
),
),
],
@@ -123,8 +123,8 @@ class _StyledOption extends StatefulWidget {
const _StyledOption(
this.answerModel,
this.optionModel, {
- Key? key,
- }) : super(key: key);
+ super.key,
+ });
@override
_StyledOptionState createState() => _StyledOptionState();
diff --git a/lib/questionnaires/view/item/answer/src/numerical_answer_filler.dart b/lib/questionnaires/view/item/answer/src/numerical_answer_filler.dart
index 39a04da5..90058434 100644
--- a/lib/questionnaires/view/item/answer/src/numerical_answer_filler.dart
+++ b/lib/questionnaires/view/item/answer/src/numerical_answer_filler.dart
@@ -133,14 +133,14 @@ class _SliderInputControl extends AnswerInputControl {
Xhtml.fromRenderingString(
context,
lowerSliderLabel,
- defaultTextStyle: Theme.of(context).textTheme.button,
+ defaultTextStyle: Theme.of(context).textTheme.labelLarge,
),
const Expanded(child: SizedBox()),
if (upperSliderLabel != null)
Xhtml.fromRenderingString(
context,
upperSliderLabel,
- defaultTextStyle: Theme.of(context).textTheme.button,
+ defaultTextStyle: Theme.of(context).textTheme.labelLarge,
),
const SizedBox(width: 8.0),
],
@@ -209,7 +209,7 @@ class _NumberFieldInputControl
errorStyle: (itemModel
.isCalculated) // Force display of error text on calculated item
? TextStyle(
- color: Theme.of(context).errorColor,
+ color: Theme.of(context).colorScheme.error,
)
: null,
hintText: answerModel.entryFormat,
@@ -271,7 +271,7 @@ class _UnitDropDown extends AnswerInputControl {
width: unitWidth,
child: Text(
answerModel.unitChoices.first.localizedDisplay(locale),
- style: Theme.of(context).textTheme.subtitle1,
+ style: Theme.of(context).textTheme.bodyMedium,
),
)
: Container(
diff --git a/lib/questionnaires/view/item/src/total_score_item.dart b/lib/questionnaires/view/item/src/total_score_item.dart
index b110dcd6..77cf4936 100644
--- a/lib/questionnaires/view/item/src/total_score_item.dart
+++ b/lib/questionnaires/view/item/src/total_score_item.dart
@@ -107,14 +107,14 @@ class _TotalScoreItemState extends State {
const SizedBox(height: 32),
Text(
FDashLocalizations.of(context).aggregationTotalScoreTitle,
- style: Theme.of(context).textTheme.headline3,
+ style: Theme.of(context).textTheme.displaySmall,
),
AnimatedSwitcher(
duration: const Duration(milliseconds: 200),
child: Text(
scoreText,
key: ValueKey(scoreText),
- style: Theme.of(context).textTheme.headline1,
+ style: Theme.of(context).textTheme.displayLarge,
),
),
AnimatedSwitcher(
diff --git a/lib/questionnaires/view/src/broken_questionnaire_item.dart b/lib/questionnaires/view/src/broken_questionnaire_item.dart
index cac14289..50d2510c 100644
--- a/lib/questionnaires/view/src/broken_questionnaire_item.dart
+++ b/lib/questionnaires/view/src/broken_questionnaire_item.dart
@@ -15,12 +15,12 @@ class BrokenQuestionnaireItem extends StatelessWidget {
this.message,
this.element,
this.cause, {
- Key? key,
- }) : super(key: key);
+ super.key,
+ });
/// Construct the item from an exception.
/// Special support for [QuestionnaireFormatException].
- BrokenQuestionnaireItem.fromException(Object exception, {Key? key})
+ BrokenQuestionnaireItem.fromException(Object exception, {super.key})
: message = (exception is QuestionnaireFormatException)
? exception.message
: exception.toString(),
@@ -29,13 +29,12 @@ class BrokenQuestionnaireItem extends StatelessWidget {
: null,
cause = (exception is QuestionnaireFormatException)
? exception.cause
- : null,
- super(key: key);
+ : null;
@override
Widget build(BuildContext context) {
return Card(
- color: Theme.of(context).errorColor,
+ color: Theme.of(context).colorScheme.error,
child: Container(
padding: const EdgeInsets.all(8),
child: Column(
diff --git a/lib/questionnaires/view/src/narrative_drawer.dart b/lib/questionnaires/view/src/narrative_drawer.dart
index 30cc0038..7a651fc6 100644
--- a/lib/questionnaires/view/src/narrative_drawer.dart
+++ b/lib/questionnaires/view/src/narrative_drawer.dart
@@ -55,7 +55,7 @@ class _NarrativeDrawerState extends State {
!_drawerMode
? FDashLocalizations.of(context).narrativePageTitle
: 'FHIR R4 JSON',
- style: Theme.of(context).textTheme.headline5,
+ style: Theme.of(context).textTheme.headlineSmall,
),
secondary: IconButton(
icon: const Icon(Icons.copy),
diff --git a/lib/questionnaires/view/src/narrative_page.dart b/lib/questionnaires/view/src/narrative_page.dart
index 6ab948af..c10fc545 100644
--- a/lib/questionnaires/view/src/narrative_page.dart
+++ b/lib/questionnaires/view/src/narrative_page.dart
@@ -15,8 +15,8 @@ class NarrativePage extends StatelessWidget {
const NarrativePage({
this.questionnaireResponseModel,
this.narrative,
- Key? key,
- }) : super(key: key);
+ super.key,
+ });
@override
Widget build(BuildContext context) {
diff --git a/lib/questionnaires/view/src/narrative_tile.dart b/lib/questionnaires/view/src/narrative_tile.dart
index 9979cc2c..51ae96a8 100644
--- a/lib/questionnaires/view/src/narrative_tile.dart
+++ b/lib/questionnaires/view/src/narrative_tile.dart
@@ -22,8 +22,8 @@ class NarrativeTile extends StatefulWidget {
const NarrativeTile({
this.questionnaireResponseModel,
this.narrative,
- Key? key,
- }) : super(key: key);
+ super.key,
+ });
@override
State createState() => _NarrativeTileState();
diff --git a/lib/questionnaires/view/src/questionnaire_complete_button.dart b/lib/questionnaires/view/src/questionnaire_complete_button.dart
index 3c3f0366..a460da52 100644
--- a/lib/questionnaires/view/src/questionnaire_complete_button.dart
+++ b/lib/questionnaires/view/src/questionnaire_complete_button.dart
@@ -11,8 +11,7 @@ import 'package:flutter/material.dart';
class QuestionnaireCompleteButton extends StatefulWidget {
final VoidCallback? onCompleted;
- const QuestionnaireCompleteButton({this.onCompleted, Key? key})
- : super(key: key);
+ const QuestionnaireCompleteButton({this.onCompleted, super.key});
@override
// ignore: library_private_types_in_public_api
diff --git a/lib/questionnaires/view/src/questionnaire_filler.dart b/lib/questionnaires/view/src/questionnaire_filler.dart
index 82bc0973..ebf4f768 100644
--- a/lib/questionnaires/view/src/questionnaire_filler.dart
+++ b/lib/questionnaires/view/src/questionnaire_filler.dart
@@ -35,7 +35,7 @@ class QuestionnaireResponseFiller extends StatefulWidget {
);
const QuestionnaireResponseFiller({
- Key? key,
+ super.key,
required this.locale,
required this.builder,
required this.fhirResourceProvider,
@@ -45,7 +45,7 @@ class QuestionnaireResponseFiller extends StatefulWidget {
this.onLinkTap,
this.questionnaireTheme = const QuestionnaireThemeData(),
this.questionnaireModelDefaults = const QuestionnaireModelDefaults(),
- }) : super(key: key);
+ });
static QuestionnaireFillerData of(BuildContext context) {
final result =
@@ -205,7 +205,6 @@ class QuestionnaireFillerData extends InheritedWidget {
QuestionnaireFillerData._(
this.questionnaireResponseModel, {
- Key? key,
required this.locale,
this.onDataAvailable,
this.onLinkTap,
@@ -217,7 +216,7 @@ class QuestionnaireFillerData extends InheritedWidget {
questionnaireResponseModel.orderedFillerItemModels().length,
null,
),
- super(key: key, child: Builder(builder: builder)) {
+ super(child: Builder(builder: builder)) {
_logger.trace('constructor _');
onDataAvailable?.call(questionnaireResponseModel);
}
diff --git a/lib/questionnaires/view/src/questionnaire_filler_progress_bar.dart b/lib/questionnaires/view/src/questionnaire_filler_progress_bar.dart
index 91f31161..824910d5 100644
--- a/lib/questionnaires/view/src/questionnaire_filler_progress_bar.dart
+++ b/lib/questionnaires/view/src/questionnaire_filler_progress_bar.dart
@@ -13,8 +13,8 @@ class QuestionnaireFillerProgressBar extends StatelessWidget {
this.height = defaultHeight,
this.answeredColor,
this.unansweredColor,
- Key? key,
- }) : super(key: key);
+ super.key,
+ });
@override
Widget build(BuildContext context) {
diff --git a/lib/questionnaires/view/src/questionnaire_information_tile.dart b/lib/questionnaires/view/src/questionnaire_information_tile.dart
index bbaa6661..5bfd5a7d 100644
--- a/lib/questionnaires/view/src/questionnaire_information_tile.dart
+++ b/lib/questionnaires/view/src/questionnaire_information_tile.dart
@@ -8,12 +8,11 @@ import 'package:flutter/material.dart';
/// Contains information such as title and publisher.
class QuestionnaireInformationTile extends StatelessWidget {
final Questionnaire questionnaire;
- const QuestionnaireInformationTile(this.questionnaire, {Key? key})
- : super(key: key);
+ const QuestionnaireInformationTile(this.questionnaire, {super.key});
@override
Widget build(BuildContext context) {
- final defaultTextStyle = Theme.of(context).textTheme.subtitle1;
+ final defaultTextStyle = Theme.of(context).textTheme.titleMedium;
return Column(
children: [
diff --git a/lib/questionnaires/view/src/questionnaire_loading_indicator.dart b/lib/questionnaires/view/src/questionnaire_loading_indicator.dart
index 90fea7a1..d1e4ffc7 100644
--- a/lib/questionnaires/view/src/questionnaire_loading_indicator.dart
+++ b/lib/questionnaires/view/src/questionnaire_loading_indicator.dart
@@ -10,13 +10,12 @@ class QuestionnaireLoadingIndicator extends StatelessWidget {
QuestionnaireLoadingIndicator(
AsyncSnapshot snapshot, {
- Key? key,
+ super.key,
}) : state = snapshot.connectionState,
hasError = snapshot.hasError,
detail = (snapshot.hasData)
? snapshot.data?.questionnaireModel.title
- : snapshot.error,
- super(key: key);
+ : snapshot.error;
@override
Widget build(BuildContext context) {
@@ -47,7 +46,7 @@ class QuestionnaireLoadingIndicator extends StatelessWidget {
if (detail != null)
Text(
detail.toString(),
- style: Theme.of(context).textTheme.subtitle1,
+ style: Theme.of(context).textTheme.titleMedium,
),
],
),
diff --git a/lib/questionnaires/view/src/questionnaire_scroller_page.dart b/lib/questionnaires/view/src/questionnaire_scroller_page.dart
index c3cd388c..7ce0d7b4 100644
--- a/lib/questionnaires/view/src/questionnaire_scroller_page.dart
+++ b/lib/questionnaires/view/src/questionnaire_scroller_page.dart
@@ -24,8 +24,8 @@ class QuestionnaireScrollerPage extends StatelessWidget {
this.aggregators,
this.onLinkTap,
this.questionnaireModelDefaults = const QuestionnaireModelDefaults(),
- Key? key,
- }) : super(key: key);
+ super.key,
+ });
@override
Widget build(BuildContext context) {
diff --git a/lib/questionnaires/view/src/questionnaire_stepper.dart b/lib/questionnaires/view/src/questionnaire_stepper.dart
index 6e1a70a1..d192ac47 100644
--- a/lib/questionnaires/view/src/questionnaire_stepper.dart
+++ b/lib/questionnaires/view/src/questionnaire_stepper.dart
@@ -18,8 +18,8 @@ class QuestionnaireStepper extends StatefulWidget {
required this.fhirResourceProvider,
required this.launchContext,
this.questionnaireModelDefaults = const QuestionnaireModelDefaults(),
- Key? key,
- }) : super(key: key);
+ super.key,
+ });
@override
State createState() => QuestionnaireStepperState();
@@ -88,7 +88,8 @@ class QuestionnaireStepperState extends State {
FDashLocalizations.of(context)
.aggregationScore(scoreString),
key: ValueKey(scoreString),
- style: Theme.of(context).textTheme.headline4,
+ style:
+ Theme.of(context).textTheme.headlineMedium,
),
);
},
diff --git a/lib/questionnaires/view/src/questionnaire_stepper_page.dart b/lib/questionnaires/view/src/questionnaire_stepper_page.dart
index 2107bb7e..790139f0 100644
--- a/lib/questionnaires/view/src/questionnaire_stepper_page.dart
+++ b/lib/questionnaires/view/src/questionnaire_stepper_page.dart
@@ -8,19 +8,13 @@ import 'package:flutter/material.dart';
/// see [QuestionnaireScrollerPage]
class QuestionnaireStepperPage extends QuestionnaireStepper {
const QuestionnaireStepperPage({
- Locale? locale,
- required FhirResourceProvider fhirResourceProvider,
- required LaunchContext launchContext,
- QuestionnaireModelDefaults questionnaireModelDefaults =
- const QuestionnaireModelDefaults(),
- Key? key,
+ super.locale,
+ required super.fhirResourceProvider,
+ required super.launchContext,
+ super.questionnaireModelDefaults,
+ super.key,
}) : super(
- locale: locale,
scaffoldBuilder: const DefaultQuestionnairePageScaffoldBuilder(),
- fhirResourceProvider: fhirResourceProvider,
- launchContext: launchContext,
- questionnaireModelDefaults: questionnaireModelDefaults,
- key: key,
);
@override
diff --git a/lib/questionnaires/view/src/questionnaire_theme.dart b/lib/questionnaires/view/src/questionnaire_theme.dart
index d6c5967c..ae8a7c18 100644
--- a/lib/questionnaires/view/src/questionnaire_theme.dart
+++ b/lib/questionnaires/view/src/questionnaire_theme.dart
@@ -17,9 +17,9 @@ class QuestionnaireTheme extends InheritedWidget {
const QuestionnaireTheme({
required this.data,
- required Widget child,
- Key? key,
- }) : super(key: key, child: child);
+ required super.child,
+ super.key,
+ });
static QuestionnaireThemeData of(BuildContext context) {
final inheritedTheme =
diff --git a/lib/questionnaires/view/src/webview_html.dart b/lib/questionnaires/view/src/webview_html.dart
index c660f595..ce2ee66b 100644
--- a/lib/questionnaires/view/src/webview_html.dart
+++ b/lib/questionnaires/view/src/webview_html.dart
@@ -12,22 +12,25 @@ Widget createWebView(String xhtml, {Key? key}) => _FullHtmlViewer(
class _FullHtmlViewer extends StatelessWidget {
final String xhtml;
- const _FullHtmlViewer(this.xhtml, {Key? key}) : super(key: key);
+ const _FullHtmlViewer(this.xhtml, {super.key});
@override
Widget build(BuildContext context) {
- // required while web support is in preview
- WebView.platform = WebWebViewPlatform();
-
final dataUrl = Uri.dataFromString(
xhtml,
mimeType: 'text/html',
encoding: Encoding.getByName('utf-8'),
).toString();
+ ;
+
return SizedBox.expand(
- child: WebView(
- initialUrl: dataUrl,
+ child: WebViewWidget(
+ controller: WebViewController.fromPlatformCreationParams(
+ const PlatformWebViewControllerCreationParams(),
+ )..loadRequest(
+ Uri.parse(dataUrl),
+ ),
),
);
}
diff --git a/lib/questionnaires/view/src/webview_io.dart b/lib/questionnaires/view/src/webview_io.dart
index 138b4d35..ed9436de 100644
--- a/lib/questionnaires/view/src/webview_io.dart
+++ b/lib/questionnaires/view/src/webview_io.dart
@@ -19,7 +19,7 @@ Widget createWebView(String xhtml, {Key? key}) =>
class _FullHtmlViewer extends StatelessWidget {
final String xhtml;
- const _FullHtmlViewer(this.xhtml, {Key? key}) : super(key: key);
+ const _FullHtmlViewer(this.xhtml, {super.key});
@override
Widget build(BuildContext context) {
@@ -30,8 +30,11 @@ class _FullHtmlViewer extends StatelessWidget {
).toString();
return SizedBox.expand(
- child: WebView(
- initialUrl: dataUrl,
+ child: WebViewWidget(
+ controller: WebViewController()
+ ..loadRequest(
+ Uri.parse(dataUrl),
+ ),
),
);
}
@@ -40,7 +43,7 @@ class _FullHtmlViewer extends StatelessWidget {
class _SimpleHtmlViewer extends StatelessWidget {
final String xhtml;
- const _SimpleHtmlViewer(this.xhtml, {Key? key}) : super(key: key);
+ const _SimpleHtmlViewer(this.xhtml, {super.key});
@override
Widget build(BuildContext context) {
@@ -49,7 +52,7 @@ class _SimpleHtmlViewer extends StatelessWidget {
child: HTML.toRichText(
context,
xhtml,
- defaultTextStyle: Theme.of(context).textTheme.bodyText2,
+ defaultTextStyle: Theme.of(context).textTheme.bodyMedium,
),
),
);
diff --git a/lib/questionnaires/view/src/xhtml.dart b/lib/questionnaires/view/src/xhtml.dart
index 037a9192..9a3c91da 100644
--- a/lib/questionnaires/view/src/xhtml.dart
+++ b/lib/questionnaires/view/src/xhtml.dart
@@ -124,7 +124,7 @@ class Xhtml extends StatelessWidget {
context,
xhtml,
defaultTextStyle:
- defaultTextStyle ?? Theme.of(context).textTheme.bodyText2,
+ defaultTextStyle ?? Theme.of(context).textTheme.bodyMedium,
),
),
);
diff --git a/pubspec.yaml b/pubspec.yaml
index 71e172a6..c623fd0f 100644
--- a/pubspec.yaml
+++ b/pubspec.yaml
@@ -20,11 +20,11 @@ repository: https://github.com/tiloc/faiadashu
issue_tracker: https://github.com/tiloc/faiadashu/issues
environment:
- sdk: '>=2.17.0 <3.0.0'
+ sdk: '>=2.18.4 <3.0.0'
flutter: '>=3.0.0'
dependencies:
- collection: ^1.16.0
+ collection: ^1.17.0
fhir: ^0.8.0
fhir_path: ^0.8.0
# fhir:
@@ -37,20 +37,22 @@ dependencies:
sdk: flutter
intl: ^0.17.0
logging: ^1.0.2
- markdown: ^5.0.0
+ markdown: ^7.0.0
meta: ^1.7.0
scrollable_positioned_list: ^0.3.2
- simple_html_css: ^3.0.1+1
- webview_flutter: ^3.0.4
- webview_flutter_web: ^0.1.0+3
+ simple_html_css: ^4.0.0
+ webview_flutter: ^4.0.0
+ webview_flutter_platform_interface: ^2.0.0
+ webview_flutter_web: ^0.2.0
+
dev_dependencies:
- dart_code_metrics: ^4.15.0
+ dart_code_metrics: ^5.0.0
flutter_test:
sdk: flutter
- lint: ^1.8.2
+ lint: ^2.0.1
# For information on the generic Dart part of this file, see the
# following page: https://dart.dev/tools/pub/pubspec
From 627011ecb845a5f97ebc64068e7f59a8429977d3 Mon Sep 17 00:00:00 2001
From: sh1l0n
Date: Wed, 26 Apr 2023 15:11:17 +0200
Subject: [PATCH 02/12] Clean up all warnings except FIXME
---
analysis_options.yaml | 1 -
example/lib/about_page.dart | 2 +-
example/lib/cherry_blossom_theme.dart | 108 +++++++++---------
example/lib/observation_page.dart | 18 +--
example/lib/primitive_page.dart | 22 ++--
example/lib/questionnaire_launch_tile.dart | 34 +++---
.../lib/questionnaire_response_storage.dart | 57 ++++-----
example/lib/value_set_provider.dart | 32 +++---
faiabench/analysis_options.yaml | 1 -
faiabench/lib/about_page.dart | 4 +-
faiabench/lib/disclaimer_page.dart | 2 +-
faiabench/lib/exhibit_page.dart | 2 +-
faiabench/lib/json_tree.dart | 2 +-
faiabench/lib/main.dart | 2 +-
.../lib/questionnaire_scroller_panel.dart | 4 +-
.../lib/restful/src/server_uploader.dart | 33 +++---
.../lib/restful/src/sync_indicator.dart | 4 +-
lib/fhir_types/src/base64_image.dart | 6 +-
lib/fhir_types/src/codeable_concept_text.dart | 4 +-
lib/fhir_types/src/date_time_picker.dart | 7 +-
lib/fhir_types/src/date_time_text.dart | 4 +-
lib/fhir_types/src/fhir_types_extensions.dart | 6 +-
lib/fhir_types/src/resource_json_tree.dart | 73 +++++-------
lib/l10n/src/fdash_localizations_ar.dart | 2 +-
lib/l10n/src/fdash_localizations_de.dart | 2 +-
lib/l10n/src/fdash_localizations_en.dart | 2 +-
lib/l10n/src/fdash_localizations_es.dart | 2 +-
lib/l10n/src/fdash_localizations_ja.dart | 2 +-
.../src/observation_value_view.dart | 2 +-
.../model/aggregation/src/aggregator.dart | 2 +-
.../src/fhirpath_expression_evaluator.dart | 2 +-
.../model/src/questionnaire_model.dart | 2 +-
.../answer/src/boolean_answer_filler.dart | 15 +--
.../item/answer/src/coding_answer_filler.dart | 89 +++++----------
.../answer/src/datetime_answer_filler.dart | 11 +-
.../view/item/answer/src/null_dash_text.dart | 6 +-
.../answer/src/numerical_answer_filler.dart | 31 ++---
.../item/answer/src/string_answer_filler.dart | 15 +--
.../view/item/src/display_item.dart | 8 +-
.../view/item/src/group_item.dart | 15 +--
.../view/item/src/item_media_image.dart | 2 +-
.../src/question_response_item_filler.dart | 5 +-
.../item/src/questionnaire_item_filler.dart | 5 +-
.../src/questionnaire_item_filler_title.dart | 20 ++--
.../view/item/src/total_score_item.dart | 6 +-
.../view/src/broken_questionnaire_item.dart | 4 +-
.../view/src/narrative_drawer.dart | 2 +-
...uestionnaire_filler_circular_progress.dart | 4 +-
.../view/src/questionnaire_scroller.dart | 4 +-
.../view/src/questionnaire_stepper_page.dart | 1 -
lib/questionnaires/view/src/webview_html.dart | 3 -
51 files changed, 312 insertions(+), 380 deletions(-)
diff --git a/analysis_options.yaml b/analysis_options.yaml
index 2cd897da..7294a00d 100644
--- a/analysis_options.yaml
+++ b/analysis_options.yaml
@@ -32,6 +32,5 @@ dart_code_metrics:
- prefer-trailing-comma
- prefer-conditional-expressions
- no-equal-then-else
- - no-magic-number
- prefer-single-widget-per-file:
ignore-private-widgets: true
diff --git a/example/lib/about_page.dart b/example/lib/about_page.dart
index 0ae3f6d3..4f09c34a 100644
--- a/example/lib/about_page.dart
+++ b/example/lib/about_page.dart
@@ -4,7 +4,7 @@ import 'package:simple_html_css/simple_html_css.dart';
import 'exhibit_page.dart';
class AboutPage extends ExhibitPage {
- const AboutPage({Key? key}) : super(key: key);
+ const AboutPage({super.key});
@override
Widget buildExhibit(BuildContext context) {
diff --git a/example/lib/cherry_blossom_theme.dart b/example/lib/cherry_blossom_theme.dart
index 732baa8d..98042fb3 100644
--- a/example/lib/cherry_blossom_theme.dart
+++ b/example/lib/cherry_blossom_theme.dart
@@ -9,22 +9,22 @@ class CherryBlossomScaffoldBuilder extends QuestionnairePageScaffoldBuilder {
@override
Widget build(
- BuildContext context, {
- required void Function(void Function() p1) setStateCallback,
- required Widget child,
- }) {
+ BuildContext context, {
+ required void Function(void Function() p1) setStateCallback,
+ required Widget child,
+ }) {
return Theme(
data: ThemeData.light().copyWith(
scrollbarTheme: ThemeData.light().scrollbarTheme.copyWith(
- thumbVisibility: MaterialStateProperty.all(true),
- thumbColor: MaterialStateProperty.all(
- const Color(0xFF5C1349),
- ),
- ),
+ thumbVisibility: MaterialStateProperty.all(true),
+ thumbColor: MaterialStateProperty.all(
+ const Color(0xFF5C1349),
+ ),
+ ),
textTheme: GoogleFonts.ralewayTextTheme(),
iconTheme: ThemeData.light().iconTheme.copyWith(
- color: const Color(0xFF5C1349),
- ),
+ color: const Color(0xFF5C1349),
+ ),
elevatedButtonTheme: ElevatedButtonThemeData(
style: ButtonStyle(
textStyle: MaterialStateProperty.all(
@@ -41,52 +41,52 @@ class CherryBlossomScaffoldBuilder extends QuestionnairePageScaffoldBuilder {
),
),
checkboxTheme: ThemeData.light().checkboxTheme.copyWith(
- fillColor: MaterialStateProperty.all(
- const Color(0xFFE30425),
- ),
- ),
- radioTheme: ThemeData.light().radioTheme.copyWith(
- fillColor: MaterialStateProperty.all(
- const Color(0xFFE30425),
- ),
- ),
- sliderTheme: ThemeData.light().sliderTheme.copyWith(
- thumbColor: const Color(0xFFE30425),
- activeTrackColor: const Color(0xFFE30425),
- inactiveTrackColor: const Color(0x60E30425),
- ),
- inputDecorationTheme: ThemeData.light().inputDecorationTheme.copyWith(
- enabledBorder: const OutlineInputBorder(
- borderSide: BorderSide(
- width: 2.0,
- color: Color.fromRGBO(0, 0, 0, 0.12),
- ),
- ),
- disabledBorder: const OutlineInputBorder(
- borderSide: BorderSide(
- width: 0,
- color: Color.fromRGBO(0, 0, 0, 0.0),
+ fillColor: MaterialStateProperty.all(
+ const Color(0xFFE30425),
+ ),
),
- ),
- focusedErrorBorder: OutlineInputBorder(
- borderSide: BorderSide(
- width: 2.0,
- color: ThemeData.light().errorColor,
+ radioTheme: ThemeData.light().radioTheme.copyWith(
+ fillColor: MaterialStateProperty.all(
+ const Color(0xFFE30425),
+ ),
),
- ),
- errorBorder: OutlineInputBorder(
- borderSide: BorderSide(
- width: 2.0,
- color: ThemeData.light().errorColor.withOpacity(0.12),
+ sliderTheme: ThemeData.light().sliderTheme.copyWith(
+ thumbColor: const Color(0xFFE30425),
+ activeTrackColor: const Color(0xFFE30425),
+ inactiveTrackColor: const Color(0x60E30425),
),
- ),
- focusedBorder: const OutlineInputBorder(
- borderSide: BorderSide(
- width: 2.0,
- color: Color.fromRGBO(0, 0, 0, 0.54),
+ inputDecorationTheme: ThemeData.light().inputDecorationTheme.copyWith(
+ enabledBorder: const OutlineInputBorder(
+ borderSide: BorderSide(
+ width: 2.0,
+ color: Color.fromRGBO(0, 0, 0, 0.12),
+ ),
+ ),
+ disabledBorder: const OutlineInputBorder(
+ borderSide: BorderSide(
+ width: 0,
+ color: Color.fromRGBO(0, 0, 0, 0.0),
+ ),
+ ),
+ focusedErrorBorder: OutlineInputBorder(
+ borderSide: BorderSide(
+ width: 2.0,
+ color: ThemeData.light().colorScheme.error,
+ ),
+ ),
+ errorBorder: OutlineInputBorder(
+ borderSide: BorderSide(
+ width: 2.0,
+ color: ThemeData.light().colorScheme.error.withOpacity(0.12),
+ ),
+ ),
+ focusedBorder: const OutlineInputBorder(
+ borderSide: BorderSide(
+ width: 2.0,
+ color: Color.fromRGBO(0, 0, 0, 0.54),
+ ),
+ ),
),
- ),
- ),
), // Make it always light
// We have to take care of SafeArea ourselves
child: SafeArea(
@@ -101,7 +101,7 @@ class CherryBlossomScaffoldBuilder extends QuestionnairePageScaffoldBuilder {
padding: const EdgeInsets.symmetric(vertical: 8),
child: Text(
'🦄🌸🦄🌸🦄🌸🦄',
- style: Theme.of(context).textTheme.headline4,
+ style: Theme.of(context).textTheme.headlineMedium,
),
),
Expanded(
diff --git a/example/lib/observation_page.dart b/example/lib/observation_page.dart
index 535e4cf6..6b3c1bb0 100644
--- a/example/lib/observation_page.dart
+++ b/example/lib/observation_page.dart
@@ -103,27 +103,27 @@ class ObservationPage extends ExhibitPage {
children: [
ObservationView(
bpObservation,
- valueStyle: Theme.of(context).textTheme.headline4,
- codeStyle: Theme.of(context).textTheme.subtitle2,
- dateTimeStyle: Theme.of(context).textTheme.caption,
+ valueStyle: Theme.of(context).textTheme.headlineMedium,
+ codeStyle: Theme.of(context).textTheme.titleSmall,
+ dateTimeStyle: Theme.of(context).textTheme.bodySmall,
),
const SizedBox(
height: 16,
),
ObservationView(
bpObservationWHR,
- valueStyle: Theme.of(context).textTheme.headline4,
- codeStyle: Theme.of(context).textTheme.subtitle2,
- dateTimeStyle: Theme.of(context).textTheme.caption,
+ valueStyle: Theme.of(context).textTheme.headlineMedium,
+ codeStyle: Theme.of(context).textTheme.titleSmall,
+ dateTimeStyle: Theme.of(context).textTheme.bodySmall,
),
const SizedBox(
height: 16,
),
ObservationView(
bpObservationWHR,
- valueStyle: Theme.of(context).textTheme.headline4,
- codeStyle: Theme.of(context).textTheme.subtitle2,
- dateTimeStyle: Theme.of(context).textTheme.caption,
+ valueStyle: Theme.of(context).textTheme.headlineMedium,
+ codeStyle: Theme.of(context).textTheme.titleSmall,
+ dateTimeStyle: Theme.of(context).textTheme.bodySmall,
locale:
const Locale.fromSubtags(languageCode: 'ar', countryCode: 'BH'),
),
diff --git a/example/lib/primitive_page.dart b/example/lib/primitive_page.dart
index d267357e..a9abb538 100644
--- a/example/lib/primitive_page.dart
+++ b/example/lib/primitive_page.dart
@@ -5,37 +5,41 @@ import 'package:flutter/material.dart';
import 'exhibit_page.dart';
class PrimitivePage extends ExhibitPage {
- const PrimitivePage({Key? key}) : super(key: key);
+ const PrimitivePage({super.key});
@override
Widget buildExhibit(BuildContext context) {
return Column(
children: [
- Text('Default locale', style: Theme.of(context).textTheme.headline6),
+ Text('Default locale', style: Theme.of(context).textTheme.titleLarge),
FhirDateTimeText(FhirDateTime('2002-02-05')),
FhirDateTimeText(FhirDateTime('2010-02-05 14:02')),
FhirDateTimeText(FhirDateTime('2010-02')),
const Spacer(),
- Text('Germany', style: Theme.of(context).textTheme.headline6),
+ Text('Germany', style: Theme.of(context).textTheme.titleLarge),
FhirDateTimeText(
FhirDateTime('2010-02-05 14:02'),
- locale: const Locale.fromSubtags(languageCode: 'de', countryCode: 'DE'),
+ locale:
+ const Locale.fromSubtags(languageCode: 'de', countryCode: 'DE'),
),
const Spacer(),
- Text('Japan', style: Theme.of(context).textTheme.headline6),
+ Text('Japan', style: Theme.of(context).textTheme.titleLarge),
FhirDateTimeText(
FhirDateTime('2010-02'),
- locale: const Locale.fromSubtags(languageCode: 'ja', countryCode: 'JP'),
+ locale:
+ const Locale.fromSubtags(languageCode: 'ja', countryCode: 'JP'),
),
FhirDateTimeText(
FhirDateTime('2010-02-05 14:02'),
- locale: const Locale.fromSubtags(languageCode: 'ja', countryCode: 'JP'),
+ locale:
+ const Locale.fromSubtags(languageCode: 'ja', countryCode: 'JP'),
),
const Spacer(),
- Text('Bahrain', style: Theme.of(context).textTheme.headline6),
+ Text('Bahrain', style: Theme.of(context).textTheme.titleLarge),
FhirDateTimeText(
FhirDateTime('2010-02-05 14:02'),
- locale: const Locale.fromSubtags(languageCode: 'ar', countryCode: 'BH'),
+ locale:
+ const Locale.fromSubtags(languageCode: 'ar', countryCode: 'BH'),
),
],
);
diff --git a/example/lib/questionnaire_launch_tile.dart b/example/lib/questionnaire_launch_tile.dart
index d8f04e96..257e8c59 100644
--- a/example/lib/questionnaire_launch_tile.dart
+++ b/example/lib/questionnaire_launch_tile.dart
@@ -15,11 +15,17 @@ class QuestionnaireLaunchTile extends StatefulWidget {
final Locale? locale;
final FhirResourceProvider fhirResourceProvider;
final LaunchContext launchContext;
- final void Function(String questionnairePath, QuestionnaireResponse? questionnaireResponse)
- saveResponseFunction;
- final void Function(BuildContext context, String questionnairePath, QuestionnaireResponse? questionnaireResponse)?
- uploadResponseFunction;
- final QuestionnaireResponse? Function(String questionnairePath) restoreResponseFunction;
+ final void Function(
+ String questionnairePath,
+ QuestionnaireResponse? questionnaireResponse,
+ ) saveResponseFunction;
+ final void Function(
+ BuildContext context,
+ String questionnairePath,
+ QuestionnaireResponse? questionnaireResponse,
+ )? uploadResponseFunction;
+ final QuestionnaireResponse? Function(String questionnairePath)
+ restoreResponseFunction;
final QuestionnaireModelDefaults questionnaireModelDefaults;
@@ -34,8 +40,8 @@ class QuestionnaireLaunchTile extends StatefulWidget {
this.uploadResponseFunction,
required this.restoreResponseFunction,
this.questionnaireModelDefaults = const QuestionnaireModelDefaults(),
- Key? key,
- }) : super(key: key);
+ super.key,
+ });
@override
// ignore: library_private_types_in_public_api
@@ -89,13 +95,13 @@ class _QuestionnaireLaunchTileState extends State {
var countString = '';
if (snapshot.hasData) {
// FIXME: Sometimes these stats are not being shown. Handle snapshot error.
- final _questionnaireResponseModel = snapshot.data!;
- final _numberCompleted =
- _questionnaireResponseModel.count((rim) => rim.isAnswered);
- final _totalNumber =
- _questionnaireResponseModel.count((rim) => rim.isAnswerable);
- countString = 'Completed: $_numberCompleted / $_totalNumber '
- '(${_percentPattern.format(_numberCompleted / _totalNumber)})';
+ final questionnaireResponseModel = snapshot.data!;
+ final numberCompleted =
+ questionnaireResponseModel.count((rim) => rim.isAnswered);
+ final totalNumber =
+ questionnaireResponseModel.count((rim) => rim.isAnswerable);
+ countString = 'Completed: $numberCompleted / $totalNumber '
+ '(${_percentPattern.format(numberCompleted / totalNumber)})';
}
return (widget.subtitle != null)
diff --git a/example/lib/questionnaire_response_storage.dart b/example/lib/questionnaire_response_storage.dart
index 65718c44..524fd497 100644
--- a/example/lib/questionnaire_response_storage.dart
+++ b/example/lib/questionnaire_response_storage.dart
@@ -21,28 +21,31 @@ class QuestionnaireResponseStorage {
final SmartFhirClient smartClient;
- QuestionnaireResponseStorage({required this.fhirUri, required this.clientId, required this.redirectUri}) :
- smartClient = SmartFhirClient(
- fhirUri: fhirUri,
- clientId: clientId,
- redirectUri: redirectUri,
- scopes: Scopes(
- clinicalScopes: [
- ClinicalScope(
- Role.patient,
- R4ResourceType.Patient,
- Interaction.any,
- ),
- ClinicalScope(
- Role.patient,
- R4ResourceType.QuestionnaireResponse,
- Interaction.any,
- ),
- ],
- openid: true,
- offlineAccess: true,
- ).scopesList(),
- );
+ QuestionnaireResponseStorage(
+ {required this.fhirUri,
+ required this.clientId,
+ required this.redirectUri})
+ : smartClient = SmartFhirClient(
+ fhirUri: fhirUri,
+ clientId: clientId,
+ redirectUri: redirectUri,
+ scopes: Scopes(
+ clinicalScopes: [
+ ClinicalScope(
+ Role.patient,
+ R4ResourceType.Patient,
+ Interaction.any,
+ ),
+ ClinicalScope(
+ Role.patient,
+ R4ResourceType.QuestionnaireResponse,
+ Interaction.any,
+ ),
+ ],
+ openid: true,
+ offlineAccess: true,
+ ).scopesList(),
+ );
final Map _savedResponses = {};
@@ -66,17 +69,17 @@ class QuestionnaireResponseStorage {
// Upload of QuestionnaireResponse to server (plus saves in-memory).
Future uploadToServer(
- BuildContext context,
- String questionnairePath,
- QuestionnaireResponse? questionnaireResponse,
- ) async {
+ BuildContext context,
+ String questionnairePath,
+ QuestionnaireResponse? questionnaireResponse,
+ ) async {
if (questionnaireResponse == null) {
return null;
}
try {
// Upload will also save locally.
final updatedQuestionnaireResponse =
- await createOrUpdateQuestionnaireResponse(
+ await createOrUpdateQuestionnaireResponse(
smartClient,
questionnaireResponse,
);
diff --git a/example/lib/value_set_provider.dart b/example/lib/value_set_provider.dart
index 5e769315..ffb4e220 100644
--- a/example/lib/value_set_provider.dart
+++ b/example/lib/value_set_provider.dart
@@ -9,36 +9,36 @@ import 'package:faiadashu/resource_provider/resource_provider.dart';
// This mechanism allows to add them from other sources.
final valueSetProvider = AssetResourceProvider.fromMap({
'http://hl7.org/fhir/ValueSet/administrative-gender':
- 'assets/valuesets/fhir_valueset_administrative_gender.json',
+ 'assets/valuesets/fhir_valueset_administrative_gender.json',
'http://hl7.org/fhir/administrative-gender':
- 'assets/codesystems/fhir_codesystem_administrative_gender.json',
+ 'assets/codesystems/fhir_codesystem_administrative_gender.json',
'http://hl7.org/fhir/ValueSet/ucum-bodyweight':
- 'assets/valuesets/ucum_bodyweight.json',
+ 'assets/valuesets/ucum_bodyweight.json',
'http://hl7.org/fhir/ValueSet/iso3166-1-2':
- 'assets/valuesets/fhir_valueset_iso3166_1_2.json',
+ 'assets/valuesets/fhir_valueset_iso3166_1_2.json',
'http://openhie.github.io/covid-19/ValueSet/WhoCrValueSetYesNoUnk':
- 'assets/valuesets/who_cr_valueset_yes_no_unknown.json',
+ 'assets/valuesets/who_cr_valueset_yes_no_unknown.json',
'http://openhie.github.io/covid-19/ValueSet/WhoCrValueSetSexAtBirth':
- 'assets/valuesets/who_cr_valueset_sex_at_birth.json',
+ 'assets/valuesets/who_cr_valueset_sex_at_birth.json',
'http://openhie.github.io/covid-19/ValueSet/WhoCrValueSetAgeUnits':
- 'assets/valuesets/who_cr_valueset_age_units.json',
+ 'assets/valuesets/who_cr_valueset_age_units.json',
'http://loinc.org/vs/LL715-4': 'assets/valuesets/loinc_ll715_4.json',
'http://openhie.github.io/covid-19/ValueSet/WhoCrValueSetPregnancyTrimester':
- 'assets/valuesets/who_cr_valueset_pregnancy_trimester.json',
+ 'assets/valuesets/who_cr_valueset_pregnancy_trimester.json',
'http://openhie.github.io/covid-19/ValueSet/WhoCrValueSetAdmin1':
- 'assets/valuesets/who_cr_valueset_admin_1.json',
+ 'assets/valuesets/who_cr_valueset_admin_1.json',
'http://openhie.github.io/covid-19/ValueSet/WhoCrValueSetPatientOutcome':
- 'assets/valuesets/who_cr_valueset_patient_outcome.json',
+ 'assets/valuesets/who_cr_valueset_patient_outcome.json',
'http://openhie.github.io/covid-19/ValueSet/WhoCrValueSetTestResult':
- 'assets/valuesets/who_cr_valueset_test_result.json',
+ 'assets/valuesets/who_cr_valueset_test_result.json',
'http://openhie.github.io/covid-19/CodeSystem/WhoCrCodeSystemPatientOutcome':
- 'assets/codesystems/who_cr_codesystem_patient_outcome.json',
+ 'assets/codesystems/who_cr_codesystem_patient_outcome.json',
'http://openhie.github.io/covid-19/CodeSystem/WhoCrCodeSystemPregnancyTrimester':
- 'assets/codesystems/who_cr_codesystem_pregnancy_trimester.json',
+ 'assets/codesystems/who_cr_codesystem_pregnancy_trimester.json',
'http://openhie.github.io/covid-19/CodeSystem/WhoCrCodeSystemQuestionnaireChoice':
- 'assets/codesystems/who_cr_codesystem_questionnaire_choice.json',
+ 'assets/codesystems/who_cr_codesystem_questionnaire_choice.json',
'http://openhie.github.io/covid-19/CodeSystem/WhoCrCodeSystemReasonForTesting':
- 'assets/codesystems/who_cr_codesystem_reason_for_testing.json',
+ 'assets/codesystems/who_cr_codesystem_reason_for_testing.json',
'http://openhie.github.io/covid-19/CodeSystem/WhoCrCodeSystemComorbidity':
- 'assets/codesystems/who_cr_codesystem_comorbidity.json',
+ 'assets/codesystems/who_cr_codesystem_comorbidity.json',
});
diff --git a/faiabench/analysis_options.yaml b/faiabench/analysis_options.yaml
index 4bfe580e..f7bb6f7d 100644
--- a/faiabench/analysis_options.yaml
+++ b/faiabench/analysis_options.yaml
@@ -28,7 +28,6 @@ dart_code_metrics:
- prefer-trailing-comma
- prefer-conditional-expressions
- no-equal-then-else
- - no-magic-number
- prefer-single-widget-per-file:
ignore-private-widgets: true
anti-patterns:
diff --git a/faiabench/lib/about_page.dart b/faiabench/lib/about_page.dart
index 438b8967..baeea61a 100644
--- a/faiabench/lib/about_page.dart
+++ b/faiabench/lib/about_page.dart
@@ -3,7 +3,7 @@ import 'package:flutter/material.dart';
import 'package:simple_html_css/simple_html_css.dart';
class AboutPage extends ExhibitPage {
- const AboutPage({Key? key}) : super(key: key);
+ const AboutPage({super.key});
@override
Widget buildExhibit(BuildContext context) {
@@ -20,7 +20,7 @@ class AboutPage extends ExhibitPage {
I love the sound of it.
私はその音が大好きです。
''',
- defaultTextStyle: Theme.of(context).textTheme.bodyText1,
+ defaultTextStyle: Theme.of(context).textTheme.bodyLarge,
),
);
}
diff --git a/faiabench/lib/disclaimer_page.dart b/faiabench/lib/disclaimer_page.dart
index b3ad29bb..961a6110 100644
--- a/faiabench/lib/disclaimer_page.dart
+++ b/faiabench/lib/disclaimer_page.dart
@@ -2,7 +2,7 @@ import 'package:faiabench/exhibit_page.dart';
import 'package:flutter/material.dart';
class DisclaimerPage extends ExhibitPage {
- const DisclaimerPage({Key? key}) : super(key: key);
+ const DisclaimerPage({super.key});
@override
Widget buildExhibit(BuildContext context) {
diff --git a/faiabench/lib/exhibit_page.dart b/faiabench/lib/exhibit_page.dart
index c52c4d26..a1166318 100644
--- a/faiabench/lib/exhibit_page.dart
+++ b/faiabench/lib/exhibit_page.dart
@@ -1,7 +1,7 @@
import 'package:flutter/material.dart';
abstract class ExhibitPage extends StatelessWidget {
- const ExhibitPage({Key? key}) : super(key: key);
+ const ExhibitPage({super.key});
String get title;
diff --git a/faiabench/lib/json_tree.dart b/faiabench/lib/json_tree.dart
index 6a7c67f7..2ea63a27 100644
--- a/faiabench/lib/json_tree.dart
+++ b/faiabench/lib/json_tree.dart
@@ -5,7 +5,7 @@ import 'package:flutter/material.dart';
class JsonTree extends StatefulWidget {
final Resource resource;
- const JsonTree(this.resource, {Key? key}) : super(key: key);
+ const JsonTree(this.resource, {super.key});
@override
// ignore: library_private_types_in_public_api
diff --git a/faiabench/lib/main.dart b/faiabench/lib/main.dart
index 27c1b9fb..cf85cc68 100644
--- a/faiabench/lib/main.dart
+++ b/faiabench/lib/main.dart
@@ -108,7 +108,7 @@ final splitViewThemeData = MultiSplitViewThemeData(
);
class MyApp extends StatelessWidget {
- const MyApp({Key? key}) : super(key: key);
+ const MyApp({super.key});
@override
Widget build(BuildContext context) {
diff --git a/faiabench/lib/questionnaire_scroller_panel.dart b/faiabench/lib/questionnaire_scroller_panel.dart
index 1f45fc8c..bb318290 100644
--- a/faiabench/lib/questionnaire_scroller_panel.dart
+++ b/faiabench/lib/questionnaire_scroller_panel.dart
@@ -19,8 +19,8 @@ class QuestionnaireScrollerPanel extends ConsumerStatefulWidget {
this.questionnaireResponse,
this.launchContext,
this.fillerOutputProvider, {
- Key? key,
- }) : super(key: key);
+ super.key,
+ });
@override
// ignore: library_private_types_in_public_api
diff --git a/faiadashu_online/lib/restful/src/server_uploader.dart b/faiadashu_online/lib/restful/src/server_uploader.dart
index f32bfd13..4cbf731a 100644
--- a/faiadashu_online/lib/restful/src/server_uploader.dart
+++ b/faiadashu_online/lib/restful/src/server_uploader.dart
@@ -3,7 +3,6 @@ import 'package:fhir/r4.dart';
import 'package:fhir_at_rest/r4.dart';
import 'package:fhir_auth/r4.dart';
-
/// Creates or updates a [QuestionnaireResponse] on the server.
///
/// Returns the [QuestionnaireResponse] with the server-side [Id].
@@ -11,38 +10,42 @@ Future createOrUpdateQuestionnaireResponse(
FhirClient client,
QuestionnaireResponse questionnaireResponse,
) async {
- final _logger = Logger.tag('server_uploader');
+ final logger = Logger.tag('server_uploader');
final baseUri = ArgumentError.checkNotNull(client.fhirUri.value);
- _logger.debug(
+ logger.debug(
'${questionnaireResponse.resourceTypeString} to be uploaded:\n${questionnaireResponse.toJson()}',
);
// Select whether update or create scenario applies
- final serverRequest = questionnaireResponse.id == null ? FhirRequest.create(
- base: baseUri,
- resource: questionnaireResponse,
- client: client,
- ) : FhirRequest.update(
- base: baseUri,
- resource: questionnaireResponse,
- client: client,
- );
+ final serverRequest = questionnaireResponse.id == null
+ ? FhirRequest.create(
+ base: baseUri,
+ resource: questionnaireResponse,
+ client: client,
+ )
+ : FhirRequest.update(
+ base: baseUri,
+ resource: questionnaireResponse,
+ client: client,
+ );
try {
final serverResponse = await serverRequest.request();
- _logger.debug('Response from server:\n${serverResponse.toJson()}');
+ logger.debug('Response from server:\n${serverResponse.toJson()}');
if (serverResponse is QuestionnaireResponse) {
return serverResponse;
} else if (serverResponse is OperationOutcome) {
throw serverResponse;
} else {
- throw Exception('Unexpected response from server:\n${serverResponse.toJson()}');
+ throw Exception(
+ 'Unexpected response from server:\n${serverResponse.toJson()}',
+ );
}
} catch (e) {
- _logger.warn('Upload failed', error: e);
+ logger.warn('Upload failed', error: e);
rethrow;
}
}
diff --git a/faiadashu_online/lib/restful/src/sync_indicator.dart b/faiadashu_online/lib/restful/src/sync_indicator.dart
index df1224e1..fa18ee03 100644
--- a/faiadashu_online/lib/restful/src/sync_indicator.dart
+++ b/faiadashu_online/lib/restful/src/sync_indicator.dart
@@ -38,10 +38,10 @@ class _SyncIndicatorState extends State
return AnimatedBuilder(
key: _ingKey,
animation: _animationController,
- builder: (BuildContext context, Widget? _widget) {
+ builder: (BuildContext context, Widget? widget) {
return Transform.rotate(
angle: _animationController.value * 2 * pi,
- child: _widget,
+ child: widget,
);
},
child: Icon(Icons.sync, color: widget.color),
diff --git a/lib/fhir_types/src/base64_image.dart b/lib/fhir_types/src/base64_image.dart
index 9056bb3a..3b724f68 100644
--- a/lib/fhir_types/src/base64_image.dart
+++ b/lib/fhir_types/src/base64_image.dart
@@ -17,8 +17,8 @@ class Base64Image extends StatefulWidget {
this.semanticLabel,
this.width,
this.height,
- Key? key,
- }) : super(key: key);
+ super.key,
+ });
@override
State createState() => _Base64ImageState();
@@ -38,7 +38,7 @@ class _Base64ImageState extends State {
height: widget.height,
semanticLabel: widget.semanticLabel,
key: (key != null && key is ValueKey)
- ? ValueKey('${key.value.toString()}-img')
+ ? ValueKey('${key.value}-img')
: null,
);
}
diff --git a/lib/fhir_types/src/codeable_concept_text.dart b/lib/fhir_types/src/codeable_concept_text.dart
index 495a72a1..2df4db24 100644
--- a/lib/fhir_types/src/codeable_concept_text.dart
+++ b/lib/fhir_types/src/codeable_concept_text.dart
@@ -11,8 +11,8 @@ class CodeableConceptText extends StatelessWidget {
this.codeableConcept, {
this.style,
this.locale,
- Key? key,
- }) : super(key: key);
+ super.key,
+ });
@override
Widget build(BuildContext context) {
diff --git a/lib/fhir_types/src/date_time_picker.dart b/lib/fhir_types/src/date_time_picker.dart
index 0713e4e5..582629d4 100644
--- a/lib/fhir_types/src/date_time_picker.dart
+++ b/lib/fhir_types/src/date_time_picker.dart
@@ -30,8 +30,8 @@ class FhirDateTimePicker extends StatefulWidget {
this.locale,
this.focusNode,
this.enabled = true,
- Key? key,
- }) : super(key: key);
+ super.key,
+ });
@override
// ignore: library_private_types_in_public_api
@@ -76,7 +76,8 @@ class _FhirDateTimePickerState extends State {
dateTime = date.toLocal();
}
- if (widget.pickerType == FhirDateTime || widget.pickerType == Time) {
+ if (mounted &&
+ (widget.pickerType == FhirDateTime || widget.pickerType == Time)) {
final time = await showTimePicker(
initialTime:
TimeOfDay.fromDateTime(_dateTimeValue?.value ?? DateTime.now()),
diff --git a/lib/fhir_types/src/date_time_text.dart b/lib/fhir_types/src/date_time_text.dart
index 703c471a..39aea8a8 100644
--- a/lib/fhir_types/src/date_time_text.dart
+++ b/lib/fhir_types/src/date_time_text.dart
@@ -14,8 +14,8 @@ class FhirDateTimeText extends StatelessWidget {
this.style,
this.defaultText = '',
this.locale,
- Key? key,
- }) : super(key: key);
+ super.key,
+ });
@override
Widget build(BuildContext context) {
diff --git a/lib/fhir_types/src/fhir_types_extensions.dart b/lib/fhir_types/src/fhir_types_extensions.dart
index 43a35ba2..26a14bcd 100644
--- a/lib/fhir_types/src/fhir_types_extensions.dart
+++ b/lib/fhir_types/src/fhir_types_extensions.dart
@@ -191,9 +191,9 @@ extension FDashCodeableConceptExtension on CodeableConcept {
bool containsCoding(String? system, String code) {
return coding?.firstWhereOrNull(
- (_coding) =>
- (_coding.code?.toString() == code) &&
- (_coding.system?.toString() == system),
+ (coding) =>
+ (coding.code?.toString() == code) &&
+ (coding.system?.toString() == system),
) !=
null;
}
diff --git a/lib/fhir_types/src/resource_json_tree.dart b/lib/fhir_types/src/resource_json_tree.dart
index c9dff9f4..db5dbe77 100644
--- a/lib/fhir_types/src/resource_json_tree.dart
+++ b/lib/fhir_types/src/resource_json_tree.dart
@@ -11,8 +11,8 @@ class ResourceJsonTree extends StatefulWidget {
const ResourceJsonTree(
this.resourceRoot, {
this.autoExpandLevel = defaultAutoExpandLevel,
- Key? key,
- }) : super(key: key);
+ super.key,
+ });
final dynamic resourceRoot;
final int autoExpandLevel;
@@ -83,8 +83,8 @@ abstract class _JsonNode extends StatefulWidget {
this.nodeValue,
this.leftOffset,
this.expandedDepth, {
- Key? key,
- }) : super(key: key);
+ super.key,
+ });
final ResourceJsonTree root;
final _JsonNode? parent;
@@ -114,22 +114,13 @@ abstract class _JsonNodeState extends State {
class _JsonViewerMapNode extends _JsonNode