Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci: fix-github-build-workflow #333

Merged
merged 7 commits into from
Sep 3, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/pr.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ jobs:
run: flutter build windows

- name: Compress artifacts
run: tar.exe -a -c -f windows-dev.zip build/windows/Runner/release
run: tar.exe -zcvf windows-dev.zip build\windows\x64\runner\Release

- name: Upload Build Zip
uses: actions/[email protected]
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -331,7 +331,7 @@ jobs:
run: flutter pub run msix:publish

- name: Compress artifacts
run: tar.exe -a -c -f windows-${{ github.event.release.tag_name }}.zip build/windows/Runner/release
run: tar.exe -zcvf windows-${{ github.event.release.tag_name }}.zip build/windows/Runner/release

- name: Upload artifacts to release
uses: svenstaro/[email protected]
Expand Down
4 changes: 2 additions & 2 deletions lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -71,8 +71,8 @@ void main() async {
/// Fvm App
class FvmApp extends StatelessWidget {
const FvmApp({
Key? key,
}) : super(key: key);
super.key,
});

@override
Widget build(BuildContext context) {
Expand Down
4 changes: 2 additions & 2 deletions lib/src/components/atoms/blur_background.dart
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ import 'package:flutter/material.dart';
class BlurBackground extends StatelessWidget {
/// Constructor
const BlurBackground({
Key? key,
super.key,
this.strength = 20.0,
}) : super(key: key);
});

/// Strength of the blur
final double strength;
Expand Down
4 changes: 2 additions & 2 deletions lib/src/components/atoms/checkbox.dart
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ class SkCheckBox extends HookWidget {
required this.label,
required this.value,
required this.onChanged,
Key? key,
}) : super(key: key);
super.key,
});

/// Current value of checkbox
final bool value;
Expand Down
4 changes: 2 additions & 2 deletions lib/src/components/atoms/console.dart
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ class Console extends HookWidget {
this.expand = false,
this.processing = false,
this.onExpand,
Key? key,
}) : super(key: key);
super.key,
});

@override
Widget build(BuildContext context) {
Expand Down
8 changes: 4 additions & 4 deletions lib/src/components/atoms/copy_button.dart
Original file line number Diff line number Diff line change
Expand Up @@ -9,21 +9,21 @@ class CopyButton extends HookWidget {
/// Constructor
const CopyButton(
this.content, {
Key? key,
}) : super(key: key);
super.key,
});

/// Content to copy
final String content;
@override
Widget build(BuildContext context) {
final isMounted = useIsMounted();
final isMounted = context.mounted;
return IconButton(
iconSize: 20,
splashRadius: 20,
icon: const Icon(Icons.content_copy),
onPressed: () async {
await Clipboard.setData(ClipboardData(text: content));
if (isMounted()) {
if (isMounted) {
// ignore: use_build_context_synchronously
notify(context.i18n('components:atoms.copiedToClipboard'));
}
Expand Down
4 changes: 2 additions & 2 deletions lib/src/components/atoms/empty_dataset.dart
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,8 @@ class EmptyDataset extends StatelessWidget {
this.iconColor,
this.backgroundColor = Colors.black,
this.opacity = 0.3,
Key? key,
}) : super(key: key);
super.key,
});

/// Icon
final Widget icon;
Expand Down
4 changes: 2 additions & 2 deletions lib/src/components/atoms/group_tile.dart
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@ class SkGroupTile extends HookWidget {
/// Constructor
const SkGroupTile({
required this.title,
Key? key,
super.key,
this.leading,
this.trailing,
this.border = false,
this.children = const [],
}) : super(key: key);
});

/// Title widget
final Widget title;
Expand Down
4 changes: 2 additions & 2 deletions lib/src/components/atoms/loading_indicator.dart
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ import 'package:flutter_spinkit/flutter_spinkit.dart';
class SkLoadingIndicator extends StatelessWidget {
/// Constructor
const SkLoadingIndicator({
Key? key,
}) : super(key: key);
super.key,
});

@override
Widget build(BuildContext context) {
Expand Down
4 changes: 2 additions & 2 deletions lib/src/components/atoms/refresh_button.dart
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ class RefreshButton extends HookWidget {
/// Constructor
const RefreshButton({
required this.onPressed,
Key? key,
}) : super(key: key);
super.key,
});

/// On press handler
final Future Function() onPressed;
Expand Down
4 changes: 2 additions & 2 deletions lib/src/components/atoms/sliver_animated_switcher.dart
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ import 'package:flutter/material.dart';
class SliverAnimatedSwitcher extends StatefulWidget {
/// Constructor
const SliverAnimatedSwitcher({
Key? key,
super.key,
required this.child,
}) : super(key: key);
});

/// Child
final Widget child;
Expand Down
4 changes: 2 additions & 2 deletions lib/src/components/atoms/sliver_section.dart
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ import 'package:flutter/rendering.dart';
class SliverSection extends StatelessWidget {
/// Constructor
const SliverSection({
Key? key,
super.key,
required this.slivers,
this.shouldDisplay = false,
}) : super(key: key);
});

/// Slivers
final List<Widget> slivers;
Expand Down
20 changes: 10 additions & 10 deletions lib/src/components/atoms/typography.dart
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ class Paragraph extends StatelessWidget {
this.text, {
this.maxLines,
this.overflow,
Key? key,
}) : super(key: key);
super.key,
});

/// Text
final String text;
Expand Down Expand Up @@ -39,8 +39,8 @@ class Caption extends StatelessWidget {
/// Constructor
const Caption(
this.text, {
Key? key,
}) : super(key: key);
super.key,
});

/// Text for caption
final String text;
Expand All @@ -58,10 +58,10 @@ class ConsoleText extends StatelessWidget {
/// Constructor
const ConsoleText(
this.text, {
Key? key,
super.key,
this.maxLines = 1,
this.color,
}) : super(key: key);
});

/// Content for stdout
final String text;
Expand Down Expand Up @@ -90,8 +90,8 @@ class Heading extends StatelessWidget {
/// Constructor
const Heading(
this.text, {
Key? key,
}) : super(key: key);
super.key,
});

/// Content
final String text;
Expand All @@ -110,8 +110,8 @@ class Subheading extends StatelessWidget {
/// Constructor
const Subheading(
this.text, {
Key? key,
}) : super(key: key);
super.key,
});

/// content
final String text;
Expand Down
4 changes: 2 additions & 2 deletions lib/src/components/molecules/info_banner.dart
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ import '../atoms/typography.dart';
// TODO: Make this generic
class InfoBanner extends StatelessWidget {
const InfoBanner({
Key? key,
}) : super(key: key);
super.key,
});

@override
Widget build(BuildContext context) {
Expand Down
4 changes: 2 additions & 2 deletions lib/src/components/molecules/list_tile.dart
Original file line number Diff line number Diff line change
Expand Up @@ -22,14 +22,14 @@ class SkListTile extends StatelessWidget {

/// Constructor
const SkListTile({
Key? key,
super.key,
required this.title,
this.subtitle,
this.leading,
this.trailing,
this.onTap,
this.selected = false,
}) : super(key: key);
});

@override
Widget build(BuildContext context) {
Expand Down
2 changes: 1 addition & 1 deletion lib/src/components/molecules/top_app_bar.dart
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import 'package:sidekick/src/window_border.dart';
/// Sidekick top app bar
class SkAppBar extends ConsumerWidget implements PreferredSizeWidget {
/// Constructor
const SkAppBar({key}) : super(key: key);
const SkAppBar({super.key});

@override
Size get preferredSize => const Size.fromHeight(45);
Expand Down
4 changes: 2 additions & 2 deletions lib/src/components/molecules/version_install_button.dart
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ class VersionInstallButton extends HookConsumerWidget {

const VersionInstallButton(
this.version, {
Key? key,
}) : super(key: key);
super.key,
});

@override
Widget build(BuildContext context, WidgetRef ref) {
Expand Down
4 changes: 2 additions & 2 deletions lib/src/components/organisms/app_bottom_bar.dart
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ import '../atoms/console.dart';

class AppBottomBar extends HookConsumerWidget {
const AppBottomBar({
Key? key,
}) : super(key: key);
super.key,
});

@override
Widget build(BuildContext context, WidgetRef ref) {
Expand Down
4 changes: 2 additions & 2 deletions lib/src/components/organisms/screen.dart
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ class SkScreen extends StatelessWidget {
this.processing = false,
this.extendBody = true,
required this.child,
Key? key,
}) : super(key: key);
super.key,
});

/// Screen title
final String title;
Expand Down
4 changes: 2 additions & 2 deletions lib/src/components/organisms/shortcut_manager.dart
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,10 @@ class NavigationIntent extends Intent {
class SkShortcutManager extends ConsumerWidget {
/// Constructor
const SkShortcutManager({
Key? key,
super.key,
required this.child,
required this.focusNode,
}) : super(key: key);
});

/// Child
final Widget child;
Expand Down
18 changes: 10 additions & 8 deletions lib/src/modules/common/app_shell.dart
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@ const pages = [
class AppShell extends HookConsumerWidget {
/// Constructor
const AppShell({
Key? key,
}) : super(key: key);
super.key,
});

NavigationRailDestination renderNavButton(
BuildContext context,
Expand Down Expand Up @@ -96,12 +96,14 @@ class AppShell extends HookConsumerWidget {
if (!compatInfo.ready && !compatInfo.waiting) {
notify("Sidekick is missing key components to work", error: true);
Future.delayed(Duration.zero).then((value) {
Navigator.pushReplacement(
context,
MaterialPageRoute(
builder: (context) => const CompatCheckScreen(),
),
);
if (context.mounted) {
Navigator.pushReplacement(
context,
MaterialPageRoute(
builder: (context) => const CompatCheckScreen(),
),
);
}
});
}

Expand Down
15 changes: 5 additions & 10 deletions lib/src/modules/common/dto/channel.dto.dart
Original file line number Diff line number Diff line change
Expand Up @@ -12,19 +12,14 @@ class ChannelDto extends ReleaseDto {

/// Constructor
ChannelDto({
required String name,
required Release? release,
required CacheVersion? cache,
required needSetup,
required super.name,
required super.release,
required super.cache,
required super.needSetup,
required this.sdkVersion,
required this.currentRelease,
required isGlobal,
required super.isGlobal,
}) : super(
name: name,
release: release,
needSetup: needSetup,
isChannel: true,
cache: cache,
isGlobal: isGlobal,
);
}
17 changes: 5 additions & 12 deletions lib/src/modules/common/dto/master.dto.dart
Original file line number Diff line number Diff line change
@@ -1,23 +1,16 @@
import 'package:fvm/fvm.dart';

import 'channel.dto.dart';

/// Master channel dto
class MasterDto extends ChannelDto {
/// Latest version of the channel
MasterDto({
required String name,
required needSetup,
required String? sdkVersion,
required CacheVersion? cache,
required bool isGlobal,
required super.name,
required super.needSetup,
required super.sdkVersion,
required super.cache,
required super.isGlobal,
}) : super(
name: name,
needSetup: needSetup,
sdkVersion: sdkVersion,
release: null,
currentRelease: null,
cache: cache,
isGlobal: isGlobal,
);
}
Loading
Loading