Skip to content

Commit

Permalink
Merge pull request #325 from charles0122/main
Browse files Browse the repository at this point in the history
  • Loading branch information
leoafarias authored Aug 31, 2024
2 parents 356124b + 57bdeb1 commit 75f07bd
Show file tree
Hide file tree
Showing 22 changed files with 582 additions and 426 deletions.
3 changes: 1 addition & 2 deletions .fvm/fvm_config.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
{
"flutterSdkVersion": "stable",
"flavors": {}
"flutterSdkVersion": "stable"
}
4 changes: 4 additions & 0 deletions .fvmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"flutter": "stable",
"flavors": {}
}
6 changes: 3 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,6 @@ app.*.map.json

# Exceptions to above rules.
!/packages/flutter_tools/test/data/dart_dependencies_test/**/.packages
.fvm/flutter_sdk


# Example builds
/examples/*/AppDir
Expand Down Expand Up @@ -71,4 +69,6 @@ stage/
/*.snap

### FVM ###
.fvm/flutter_sdk

# FVM Version Cache
.fvm/
6 changes: 2 additions & 4 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
{
"dart.flutterSdkPath": ".fvm/flutter_sdk",
// Remove .fvm files from search
"dart.flutterSdkPath": ".fvm/versions/stable",
"search.exclude": {
"**/.fvm": true
},
// Remove from file watching
"files.watcherExclude": {
"**/.fvm": true
}
}
}
3 changes: 3 additions & 0 deletions lib/src/components/atoms/console.dart
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ class Console extends HookWidget {
Widget build(BuildContext context) {
final output = useStream(fvmStdoutProvider);
final lines = useState<List<String>>(['']);
final consoleScrollController = ScrollController();

useEffect(() {
lines.value.insert(0, output.data ?? '');
Expand Down Expand Up @@ -73,7 +74,9 @@ class Console extends HookWidget {
),
),
secondChild: CupertinoScrollbar(
controller: consoleScrollController,
child: ListView.builder(
controller: consoleScrollController,
primary: false,
shrinkWrap: true,
reverse: true,
Expand Down
2 changes: 1 addition & 1 deletion lib/src/hooks/floating_search_bar_controller.dart
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import 'package:flutter_hooks/flutter_hooks.dart';
import 'package:material_floating_search_bar/material_floating_search_bar.dart';
import 'package:material_floating_search_bar_2/material_floating_search_bar_2.dart';

FloatingSearchBarController useFloatingSearchBarController() =>
use(const _FloatingSearchBarControllerHook());
Expand Down
3 changes: 3 additions & 0 deletions lib/src/modules/fvm/dialogs/cleanup_unused_dialog.dart
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import '../fvm_queue.provider.dart';

Future<void> cleanupUnusedDialog(BuildContext context, WidgetRef ref) async {
final unusedVersions = ref.read(unusedVersionProvider);
final scrollController = ScrollController();

if (unusedVersions.isEmpty) {
notify(context
Expand Down Expand Up @@ -52,7 +53,9 @@ Future<void> cleanupUnusedDialog(BuildContext context, WidgetRef ref) async {
content: Container(
constraints: const BoxConstraints(maxWidth: 350, maxHeight: 300),
child: CupertinoScrollbar(
controller: scrollController,
child: SingleChildScrollView(
controller: scrollController,
child: Column(
children: [
Text(
Expand Down
3 changes: 3 additions & 0 deletions lib/src/modules/fvm/fvm.screen.dart
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ class FVMScreen extends ConsumerWidget {
@override
Widget build(BuildContext context, WidgetRef ref) {
final cachedVersions = ref.watch(releasesStateProvider);
final sdkScrollController = ScrollController();

if (cachedVersions.fetching) {
return const Center(child: CircularProgressIndicator());
Expand Down Expand Up @@ -52,7 +53,9 @@ class FVMScreen extends ConsumerWidget {
),
],
child: CupertinoScrollbar(
controller: sdkScrollController,
child: ListView.separated(
controller: sdkScrollController,
itemCount: cachedVersions.all.length,
separatorBuilder: (_, __) => const Divider(height: 0),
itemBuilder: (context, index) {
Expand Down
3 changes: 3 additions & 0 deletions lib/src/modules/projects/projects.screen.dart
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ class ProjectsScreen extends HookConsumerWidget {
final settings = ref.watch(settingsProvider);

final filteredProjects = useState(projects);
final projectsScrollController = ScrollController();

Future<void> onRefresh() async {
await ref.read(projectsProvider.notifier).load();
Expand Down Expand Up @@ -99,9 +100,11 @@ class ProjectsScreen extends HookConsumerWidget {
child: projects.isEmpty
? const EmptyProjects()
: CupertinoScrollbar(
controller: projectsScrollController,
child: Padding(
padding: const EdgeInsets.only(left: 10),
child: ResponsiveGridList(
controller: projectsScrollController,
desiredItemWidth: 290,
minSpacing: 0,
children: filteredProjects.value.map((project) {
Expand Down
3 changes: 3 additions & 0 deletions lib/src/modules/sandbox/sandbox.screen.dart
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ class SandboxScreen extends HookConsumerWidget {
final processing = ref.watch(sandboxProvider).processing;

final selectedRelease = useState<ReleaseDto?>(null);
final sandboxScrollController = ScrollController();

useEffect(() {
if (selectedRelease.value == null && releases.all.isNotEmpty) {
Expand Down Expand Up @@ -96,9 +97,11 @@ class SandboxScreen extends HookConsumerWidget {
const Divider(height: 1),
Expanded(
child: CupertinoScrollbar(
controller: sandboxScrollController,
child: Padding(
padding: const EdgeInsets.all(15.0),
child: ListView(
controller: sandboxScrollController,
children: releases.all.map(
(version) {
if (version.name == selectedRelease.value?.name) {
Expand Down
2 changes: 1 addition & 1 deletion lib/src/modules/search/components/search_bar.dart
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import 'package:flutter/material.dart';
import 'package:flutter_hooks/flutter_hooks.dart';
import 'package:hooks_riverpod/hooks_riverpod.dart';
import 'package:material_floating_search_bar/material_floating_search_bar.dart';
import 'package:material_floating_search_bar_2/material_floating_search_bar_2.dart';
import 'package:sidekick/src/modules/common/utils/helpers.dart';

import '../../../components/atoms/blur_background.dart';
Expand Down
3 changes: 3 additions & 0 deletions lib/src/modules/selected_detail/components/info_drawer.dart
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ class SelectedDetailDrawer extends ConsumerWidget {
Widget build(BuildContext context, WidgetRef ref) {
final detail = ref.watch(selectedDetailProvider);
final selected = detail?.release;
final detailScrollController = ScrollController();

void onClose() {
// Close drawer if its not large layout
Expand Down Expand Up @@ -82,7 +83,9 @@ class SelectedDetailDrawer extends ConsumerWidget {
),
),
body: CupertinoScrollbar(
controller: detailScrollController,
child: ListView(
controller: detailScrollController,
primary: false,
children: [
ReferenceInfoTile(selected),
Expand Down
2 changes: 1 addition & 1 deletion lib/src/modules/settings/settings.dto.dart
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ class SidekickSettings {
dataSource: AssetBundleLocalizationDataSource(
bundlePath: 'localizations',
),
options: I18NextOptions(formatter: languageManager.formatter),
// options: I18NextOptions(formatter: languageManager.formatter),
);

/// Storage key
Expand Down
2 changes: 2 additions & 0 deletions macos/Flutter/GeneratedPluginRegistrant.swift
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import Foundation
import bitsdojo_window_macos
import file_selector_macos
import macos_window_utils
import open_file_mac
import path_provider_foundation
import screen_retriever
import shared_preferences_foundation
Expand All @@ -19,6 +20,7 @@ func RegisterGeneratedPlugins(registry: FlutterPluginRegistry) {
BitsdojoWindowPlugin.register(with: registry.registrar(forPlugin: "BitsdojoWindowPlugin"))
FileSelectorPlugin.register(with: registry.registrar(forPlugin: "FileSelectorPlugin"))
MacOSWindowUtilsPlugin.register(with: registry.registrar(forPlugin: "MacOSWindowUtilsPlugin"))
OpenFilePlugin.register(with: registry.registrar(forPlugin: "OpenFilePlugin"))
PathProviderPlugin.register(with: registry.registrar(forPlugin: "PathProviderPlugin"))
ScreenRetrieverPlugin.register(with: registry.registrar(forPlugin: "ScreenRetrieverPlugin"))
SharedPreferencesPlugin.register(with: registry.registrar(forPlugin: "SharedPreferencesPlugin"))
Expand Down
16 changes: 11 additions & 5 deletions macos/Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ PODS:
- FlutterMacOS (1.0.0)
- macos_window_utils (1.0.0):
- FlutterMacOS
- open_file_mac (0.0.1):
- FlutterMacOS
- path_provider_foundation (0.0.1):
- Flutter
- FlutterMacOS
Expand All @@ -26,6 +28,7 @@ DEPENDENCIES:
- file_selector_macos (from `Flutter/ephemeral/.symlinks/plugins/file_selector_macos/macos`)
- FlutterMacOS (from `Flutter/ephemeral`)
- macos_window_utils (from `Flutter/ephemeral/.symlinks/plugins/macos_window_utils/macos`)
- open_file_mac (from `Flutter/ephemeral/.symlinks/plugins/open_file_mac/macos`)
- path_provider_foundation (from `Flutter/ephemeral/.symlinks/plugins/path_provider_foundation/darwin`)
- screen_retriever (from `Flutter/ephemeral/.symlinks/plugins/screen_retriever/macos`)
- shared_preferences_foundation (from `Flutter/ephemeral/.symlinks/plugins/shared_preferences_foundation/darwin`)
Expand All @@ -42,6 +45,8 @@ EXTERNAL SOURCES:
:path: Flutter/ephemeral
macos_window_utils:
:path: Flutter/ephemeral/.symlinks/plugins/macos_window_utils/macos
open_file_mac:
:path: Flutter/ephemeral/.symlinks/plugins/open_file_mac/macos
path_provider_foundation:
:path: Flutter/ephemeral/.symlinks/plugins/path_provider_foundation/darwin
screen_retriever:
Expand All @@ -57,16 +62,17 @@ EXTERNAL SOURCES:

SPEC CHECKSUMS:
bitsdojo_window_macos: 44e3b8fe3dd463820e0321f6256c5b1c16bb6a00
file_selector_macos: 0f85c1108e2fd597b58246bc0b0c1cb483d7593b
file_selector_macos: 54fdab7caa3ac3fc43c9fac4d7d8d231277f8cf2
FlutterMacOS: 8f6f14fa908a6fb3fba0cd85dbd81ec4b251fb24
macos_window_utils: 933f91f64805e2eb91a5bd057cf97cd097276663
path_provider_foundation: eaf5b3e458fc0e5fbb9940fb09980e853fe058b8
open_file_mac: 0e554648e2a87ce59e9438e3e5ca3e552e90d89a
path_provider_foundation: 2b6b4c569c0fb62ec74538f866245ac84301af46
screen_retriever: 59634572a57080243dd1bf715e55b6c54f241a38
shared_preferences_foundation: e2dae3258e06f44cc55f49d42024fd8dd03c590c
url_launcher_macos: 5335912b679c073563f29d89d33d10d459f95451
shared_preferences_foundation: fcdcbc04712aee1108ac7fda236f363274528f78
url_launcher_macos: 5f437abeda8c85500ceb03f5c1938a8c5a705399
window_manager: 3a1844359a6295ab1e47659b1a777e36773cd6e8
window_size: 339dafa0b27a95a62a843042038fa6c3c48de195

PODFILE CHECKSUM: 7aa1d423c1515a30c2de10403d141950ff9e7ad2

COCOAPODS: 1.12.1
COCOAPODS: 1.15.2
4 changes: 3 additions & 1 deletion macos/Runner.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,7 @@
attributes = {
BuildIndependentTargetsInParallel = YES;
LastSwiftUpdateCheck = 0920;
LastUpgradeCheck = 1300;
LastUpgradeCheck = 1510;
ORGANIZATIONNAME = "The Flutter Authors";
TargetAttributes = {
33CC10EC2044A3C60003C045 = {
Expand Down Expand Up @@ -268,6 +268,7 @@
"${BUILT_PRODUCTS_DIR}/bitsdojo_window_macos/bitsdojo_window_macos.framework",
"${BUILT_PRODUCTS_DIR}/file_selector_macos/file_selector_macos.framework",
"${BUILT_PRODUCTS_DIR}/macos_window_utils/macos_window_utils.framework",
"${BUILT_PRODUCTS_DIR}/open_file_mac/open_file_mac.framework",
"${BUILT_PRODUCTS_DIR}/path_provider_foundation/path_provider_foundation.framework",
"${BUILT_PRODUCTS_DIR}/screen_retriever/screen_retriever.framework",
"${BUILT_PRODUCTS_DIR}/shared_preferences_foundation/shared_preferences_foundation.framework",
Expand All @@ -280,6 +281,7 @@
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/bitsdojo_window_macos.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/file_selector_macos.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/macos_window_utils.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/open_file_mac.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/path_provider_foundation.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/screen_retriever.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/shared_preferences_foundation.framework",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1300"
LastUpgradeVersion = "1510"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
Expand Down
2 changes: 1 addition & 1 deletion macos/Runner/AppDelegate.swift
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import Cocoa
import FlutterMacOS

@NSApplicationMain
@main
class AppDelegate: FlutterAppDelegate {
override func applicationShouldTerminateAfterLastWindowClosed(_ sender: NSApplication) -> Bool {
return true
Expand Down
Loading

0 comments on commit 75f07bd

Please sign in to comment.