Skip to content

Commit

Permalink
wip: Update on 20240623-1
Browse files Browse the repository at this point in the history
  • Loading branch information
lijy91 committed Jun 23, 2024
1 parent aabf3ea commit 011fca1
Show file tree
Hide file tree
Showing 5 changed files with 31 additions and 23 deletions.
4 changes: 2 additions & 2 deletions apps/biyi_app/lib/app/home/desktop_popup.dart
Original file line number Diff line number Diff line change
Expand Up @@ -544,7 +544,7 @@ class _DesktopPopupPageState extends State<DesktopPopupPage>
if (translateResponse is StreamTranslateResponse) {
translateResponse.stream.listen(
(event) {
setState(() {});
if (mounted) setState(() {});
},
onDone: () {},
);
Expand Down Expand Up @@ -585,7 +585,7 @@ class _DesktopPopupPageState extends State<DesktopPopupPage>
.translateError = translateError;
}

setState(() {});
if (mounted) setState(() {});

return true;
});
Expand Down
2 changes: 2 additions & 0 deletions apps/biyi_app/lib/services/api_client.dart
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
import 'package:biyi_api_client/biyi_api_client.dart';
import 'package:flutter/foundation.dart';
export 'package:biyi_api_client/biyi_api_client.dart' hide ApiClient;

ApiClient apiClient = ApiClient(
// baseUrl: 'http://localhost:3000',
debug: kDebugMode,
);
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ class CustomizedAppBar extends StatelessWidget implements PreferredSizeWidget {

@override
Widget build(BuildContext context) {
ThemeData theme = Theme.of(context);
final ModalRoute<dynamic>? parentRoute = ModalRoute.of(context);

final bool canPop = parentRoute?.canPop ?? false;
Expand All @@ -29,6 +30,7 @@ class CustomizedAppBar extends StatelessWidget implements PreferredSizeWidget {
? FluentIcons.dismiss_20_regular
: FluentIcons.chevron_left_20_regular,
variant: IconButtonVariant.transparent,
color: ExtendedColors.neutral.shade900,
onPressed: () {
Navigator.of(context).pop();
},
Expand All @@ -38,12 +40,12 @@ class CustomizedAppBar extends StatelessWidget implements PreferredSizeWidget {

return Container(
height: double.infinity,
padding: const EdgeInsets.only(
left: 16,
padding: EdgeInsets.only(
left: leadingWidget == null ? 16 : 4,
right: 16,
),
decoration: BoxDecoration(
color: Theme.of(context).colorScheme.surfaceContainerLow,
color: theme.colorScheme.surfaceContainerLow,
border: Border(
bottom: BorderSide(
color: Theme.of(context).dividerColor,
Expand All @@ -53,11 +55,15 @@ class CustomizedAppBar extends StatelessWidget implements PreferredSizeWidget {
),
child: Row(
children: [
if (leadingWidget != null) leadingWidget,
if (leadingWidget != null)
Container(
margin: const EdgeInsets.only(right: 4),
child: leadingWidget,
),
DefaultTextStyle(
style: Theme.of(context).textTheme.titleMedium!.copyWith(
fontSize: 16,
),
style: theme.textTheme.titleMedium!.copyWith(
fontSize: 16,
),
child: title,
),
Expanded(child: Container()),
Expand All @@ -72,5 +78,5 @@ class CustomizedAppBar extends StatelessWidget implements PreferredSizeWidget {
}

@override
Size get preferredSize => const Size.fromHeight(48);
Size get preferredSize => const Size.fromHeight(44);
}
24 changes: 12 additions & 12 deletions apps/biyi_app/pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -536,7 +536,7 @@ packages:
description:
path: "packages/influxui"
ref: HEAD
resolved-ref: "30ea962d4d58e0a43dfed7dd02171cd57e2c5d0a"
resolved-ref: "2243a6289219d7d1ef3499c45976780dceee3e23"
url: "https://github.com/leanflutter/influxui.git"
source: git
version: "0.0.1"
Expand Down Expand Up @@ -833,7 +833,7 @@ packages:
description:
path: "packages/preference_list"
ref: HEAD
resolved-ref: "30ea962d4d58e0a43dfed7dd02171cd57e2c5d0a"
resolved-ref: "2243a6289219d7d1ef3499c45976780dceee3e23"
url: "https://github.com/leanflutter/influxui.git"
source: git
version: "0.0.2"
Expand Down Expand Up @@ -881,42 +881,42 @@ packages:
dependency: "direct main"
description:
name: screen_capturer
sha256: "3d24dcc0782e772bcb53f8776c1c6ccebd72ea0ab38b05817a1702aff995bc57"
sha256: "0c23dc24e0fff79e5a4162e71a32fc25cd947c6af70cf08db2f099a5ce660f30"
url: "https://pub.dev"
source: hosted
version: "0.2.1"
version: "0.2.2"
screen_capturer_linux:
dependency: transitive
description:
name: screen_capturer_linux
sha256: bc6a4a7c6f163409e66f74f5e1f1c656a177bfeea81a4b59bbd9fb146171c937
sha256: ee8481b32d83a9bdcef598d20d1fcfc4f36dee6c43b31184f0d829bb32fab4ba
url: "https://pub.dev"
source: hosted
version: "0.2.0"
version: "0.2.2"
screen_capturer_macos:
dependency: transitive
description:
name: screen_capturer_macos
sha256: "6c4b96762642d4effc797d67cdca14a173cc4c151dd6b3870a0984a92326c52e"
sha256: "92b67dfbae3263d2228e2438b74dc9aae8cdc9ccacca152f0f8e8531ed5aff8b"
url: "https://pub.dev"
source: hosted
version: "0.2.0"
version: "0.2.2"
screen_capturer_platform_interface:
dependency: transitive
description:
name: screen_capturer_platform_interface
sha256: ac73e14acc09496f9d5bd4e568c89d73b6e7f90a3ffc467c6c955aa7172d9400
sha256: f53d3b955bb413cf4f9bd928c501297a3eb490a72b6a147c8384d4cd5feb872a
url: "https://pub.dev"
source: hosted
version: "0.2.0"
version: "0.2.2"
screen_capturer_windows:
dependency: transitive
description:
name: screen_capturer_windows
sha256: "8c60d6f15d6d2042835ad7d59a9ef6bdf8a07c4f629111661fb4272c7c55d086"
sha256: "141542ff0ce1dae0df9c6625182c480c973c20282dc85f866fbc9215dcbbe04f"
url: "https://pub.dev"
source: hosted
version: "0.2.0"
version: "0.2.2"
screen_retriever:
dependency: "direct main"
description:
Expand Down
2 changes: 1 addition & 1 deletion apps/biyi_app/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ dependencies:
protocol_handler: ^0.1.6
provider: ^6.1.1
reorderables: ^0.6.0
screen_capturer: ^0.2.1
screen_capturer: ^0.2.2
screen_retriever: ^0.1.9
screen_text_extractor: ^0.1.3
shortid: ^0.1.2
Expand Down

0 comments on commit 011fca1

Please sign in to comment.