fix developer view keyboard, update mobilescanner/ios

This commit is contained in:
Christien Rioux 2024-06-23 13:19:54 -04:00
parent 554f9b9a54
commit 01ba275c71
5 changed files with 159 additions and 110 deletions

View File

@ -198,6 +198,7 @@
"title": "Developer Logs", "title": "Developer Logs",
"command": "Command", "command": "Command",
"copied": "Selection copied", "copied": "Selection copied",
"copied_all": "Copied all content",
"cleared": "Logs cleared", "cleared": "Logs cleared",
"are_you_sure_clear": "Are you sure you want to clear the logs?" "are_you_sure_clear": "Are you sure you want to clear the logs?"
}, },

View File

@ -4,68 +4,66 @@ PODS:
- Flutter (1.0.0) - Flutter (1.0.0)
- flutter_native_splash (0.0.1): - flutter_native_splash (0.0.1):
- Flutter - Flutter
- GoogleDataTransport (9.2.5): - GoogleDataTransport (9.4.1):
- GoogleUtilities/Environment (~> 7.7) - GoogleUtilities/Environment (~> 7.7)
- nanopb (< 2.30910.0, >= 2.30908.0) - nanopb (< 2.30911.0, >= 2.30908.0)
- PromisesObjC (< 3.0, >= 1.2) - PromisesObjC (< 3.0, >= 1.2)
- GoogleMLKit/BarcodeScanning (4.0.0): - GoogleMLKit/BarcodeScanning (6.0.0):
- GoogleMLKit/MLKitCore - GoogleMLKit/MLKitCore
- MLKitBarcodeScanning (~> 3.0.0) - MLKitBarcodeScanning (~> 5.0.0)
- GoogleMLKit/MLKitCore (4.0.0): - GoogleMLKit/MLKitCore (6.0.0):
- MLKitCommon (~> 9.0.0) - MLKitCommon (~> 11.0.0)
- GoogleToolboxForMac/DebugUtils (2.3.2): - GoogleToolboxForMac/Defines (4.2.1)
- GoogleToolboxForMac/Defines (= 2.3.2) - GoogleToolboxForMac/Logger (4.2.1):
- GoogleToolboxForMac/Defines (2.3.2) - GoogleToolboxForMac/Defines (= 4.2.1)
- GoogleToolboxForMac/Logger (2.3.2): - "GoogleToolboxForMac/NSData+zlib (4.2.1)":
- GoogleToolboxForMac/Defines (= 2.3.2) - GoogleToolboxForMac/Defines (= 4.2.1)
- "GoogleToolboxForMac/NSData+zlib (2.3.2)": - GoogleUtilities/Environment (7.13.3):
- GoogleToolboxForMac/Defines (= 2.3.2) - GoogleUtilities/Privacy
- "GoogleToolboxForMac/NSDictionary+URLArguments (2.3.2)":
- GoogleToolboxForMac/DebugUtils (= 2.3.2)
- GoogleToolboxForMac/Defines (= 2.3.2)
- "GoogleToolboxForMac/NSString+URLArguments (= 2.3.2)"
- "GoogleToolboxForMac/NSString+URLArguments (2.3.2)"
- GoogleUtilities/Environment (7.11.5):
- PromisesObjC (< 3.0, >= 1.2) - PromisesObjC (< 3.0, >= 1.2)
- GoogleUtilities/Logger (7.11.5): - GoogleUtilities/Logger (7.13.3):
- GoogleUtilities/Environment - GoogleUtilities/Environment
- GoogleUtilities/UserDefaults (7.11.5): - GoogleUtilities/Privacy
- GoogleUtilities/Privacy (7.13.3)
- GoogleUtilities/UserDefaults (7.13.3):
- GoogleUtilities/Logger - GoogleUtilities/Logger
- GoogleUtilities/Privacy
- GoogleUtilitiesComponents (1.1.0): - GoogleUtilitiesComponents (1.1.0):
- GoogleUtilities/Logger - GoogleUtilities/Logger
- GTMSessionFetcher/Core (2.3.0) - GTMSessionFetcher/Core (3.4.1)
- MLImage (1.0.0-beta4) - MLImage (1.0.0-beta5)
- MLKitBarcodeScanning (3.0.0): - MLKitBarcodeScanning (5.0.0):
- MLKitCommon (~> 9.0) - MLKitCommon (~> 11.0)
- MLKitVision (~> 5.0) - MLKitVision (~> 7.0)
- MLKitCommon (9.0.0): - MLKitCommon (11.0.0):
- GoogleDataTransport (~> 9.0) - GoogleDataTransport (< 10.0, >= 9.4.1)
- GoogleToolboxForMac/Logger (~> 2.1) - GoogleToolboxForMac/Logger (< 5.0, >= 4.2.1)
- "GoogleToolboxForMac/NSData+zlib (~> 2.1)" - "GoogleToolboxForMac/NSData+zlib (< 5.0, >= 4.2.1)"
- "GoogleToolboxForMac/NSDictionary+URLArguments (~> 2.1)" - GoogleUtilities/UserDefaults (< 8.0, >= 7.13.0)
- GoogleUtilities/UserDefaults (~> 7.0)
- GoogleUtilitiesComponents (~> 1.0) - GoogleUtilitiesComponents (~> 1.0)
- GTMSessionFetcher/Core (< 3.0, >= 1.1) - GTMSessionFetcher/Core (< 4.0, >= 3.3.2)
- MLKitVision (5.0.0): - MLKitVision (7.0.0):
- GoogleToolboxForMac/Logger (~> 2.1) - GoogleToolboxForMac/Logger (< 5.0, >= 4.2.1)
- "GoogleToolboxForMac/NSData+zlib (~> 2.1)" - "GoogleToolboxForMac/NSData+zlib (< 5.0, >= 4.2.1)"
- GTMSessionFetcher/Core (< 3.0, >= 1.1) - GTMSessionFetcher/Core (< 4.0, >= 3.3.2)
- MLImage (= 1.0.0-beta4) - MLImage (= 1.0.0-beta5)
- MLKitCommon (~> 9.0) - MLKitCommon (~> 11.0)
- mobile_scanner (3.5.6): - mobile_scanner (5.1.1):
- Flutter
- GoogleMLKit/BarcodeScanning (~> 6.0.0)
- nanopb (2.30910.0):
- nanopb/decode (= 2.30910.0)
- nanopb/encode (= 2.30910.0)
- nanopb/decode (2.30910.0)
- nanopb/encode (2.30910.0)
- package_info_plus (0.4.5):
- Flutter - Flutter
- GoogleMLKit/BarcodeScanning (~> 4.0.0)
- nanopb (2.30909.0):
- nanopb/decode (= 2.30909.0)
- nanopb/encode (= 2.30909.0)
- nanopb/decode (2.30909.0)
- nanopb/encode (2.30909.0)
- pasteboard (0.0.1): - pasteboard (0.0.1):
- Flutter - Flutter
- path_provider_foundation (0.0.1): - path_provider_foundation (0.0.1):
- Flutter - Flutter
- FlutterMacOS - FlutterMacOS
- PromisesObjC (2.3.1) - PromisesObjC (2.4.0)
- share_plus (0.0.1): - share_plus (0.0.1):
- Flutter - Flutter
- shared_preferences_foundation (0.0.1): - shared_preferences_foundation (0.0.1):
@ -88,6 +86,7 @@ DEPENDENCIES:
- Flutter (from `Flutter`) - Flutter (from `Flutter`)
- flutter_native_splash (from `.symlinks/plugins/flutter_native_splash/ios`) - flutter_native_splash (from `.symlinks/plugins/flutter_native_splash/ios`)
- mobile_scanner (from `.symlinks/plugins/mobile_scanner/ios`) - mobile_scanner (from `.symlinks/plugins/mobile_scanner/ios`)
- package_info_plus (from `.symlinks/plugins/package_info_plus/ios`)
- pasteboard (from `.symlinks/plugins/pasteboard/ios`) - pasteboard (from `.symlinks/plugins/pasteboard/ios`)
- path_provider_foundation (from `.symlinks/plugins/path_provider_foundation/darwin`) - path_provider_foundation (from `.symlinks/plugins/path_provider_foundation/darwin`)
- share_plus (from `.symlinks/plugins/share_plus/ios`) - share_plus (from `.symlinks/plugins/share_plus/ios`)
@ -122,6 +121,8 @@ EXTERNAL SOURCES:
:path: ".symlinks/plugins/flutter_native_splash/ios" :path: ".symlinks/plugins/flutter_native_splash/ios"
mobile_scanner: mobile_scanner:
:path: ".symlinks/plugins/mobile_scanner/ios" :path: ".symlinks/plugins/mobile_scanner/ios"
package_info_plus:
:path: ".symlinks/plugins/package_info_plus/ios"
pasteboard: pasteboard:
:path: ".symlinks/plugins/pasteboard/ios" :path: ".symlinks/plugins/pasteboard/ios"
path_provider_foundation: path_provider_foundation:
@ -145,27 +146,28 @@ SPEC CHECKSUMS:
camera_avfoundation: 759172d1a77ae7be0de08fc104cfb79738b8a59e camera_avfoundation: 759172d1a77ae7be0de08fc104cfb79738b8a59e
Flutter: e0871f40cf51350855a761d2e70bf5af5b9b5de7 Flutter: e0871f40cf51350855a761d2e70bf5af5b9b5de7
flutter_native_splash: edf599c81f74d093a4daf8e17bd7a018854bc778 flutter_native_splash: edf599c81f74d093a4daf8e17bd7a018854bc778
GoogleDataTransport: 54dee9d48d14580407f8f5fbf2f496e92437a2f2 GoogleDataTransport: 6c09b596d841063d76d4288cc2d2f42cc36e1e2a
GoogleMLKit: 2bd0dc6253c4d4f227aad460f69215a504b2980e GoogleMLKit: 97ac7af399057e99182ee8edfa8249e3226a4065
GoogleToolboxForMac: 8bef7c7c5cf7291c687cf5354f39f9db6399ad34 GoogleToolboxForMac: d1a2cbf009c453f4d6ded37c105e2f67a32206d8
GoogleUtilities: 13e2c67ede716b8741c7989e26893d151b2b2084 GoogleUtilities: ea963c370a38a8069cc5f7ba4ca849a60b6d7d15
GoogleUtilitiesComponents: 679b2c881db3b615a2777504623df6122dd20afe GoogleUtilitiesComponents: 679b2c881db3b615a2777504623df6122dd20afe
GTMSessionFetcher: 3a63d75eecd6aa32c2fc79f578064e1214dfdec2 GTMSessionFetcher: 8000756fc1c19d2e5697b90311f7832d2e33f6cd
MLImage: 7bb7c4264164ade9bf64f679b40fb29c8f33ee9b MLImage: 1824212150da33ef225fbd3dc49f184cf611046c
MLKitBarcodeScanning: 04e264482c5f3810cb89ebc134ef6b61e67db505 MLKitBarcodeScanning: 10ca0845a6d15f2f6e911f682a1998b68b973e8b
MLKitCommon: c1b791c3e667091918d91bda4bba69a91011e390 MLKitCommon: afec63980417d29ffbb4790529a1b0a2291699e1
MLKitVision: 8baa5f46ee3352614169b85250574fde38c36f49 MLKitVision: e858c5f125ecc288e4a31127928301eaba9ae0c1
mobile_scanner: 38dcd8a49d7d485f632b7de65e4900010187aef2 mobile_scanner: 8564358885a9253c43f822435b70f9345c87224f
nanopb: b552cce312b6c8484180ef47159bc0f65a1f0431 nanopb: 438bc412db1928dac798aa6fd75726007be04262
package_info_plus: 58f0028419748fad15bf008b270aaa8e54380b1c
pasteboard: 982969ebaa7c78af3e6cc7761e8f5e77565d9ce0 pasteboard: 982969ebaa7c78af3e6cc7761e8f5e77565d9ce0
path_provider_foundation: 3784922295ac71e43754bd15e0653ccfd36a147c path_provider_foundation: 2b6b4c569c0fb62ec74538f866245ac84301af46
PromisesObjC: c50d2056b5253dadbd6c2bea79b0674bd5a52fa4 PromisesObjC: f5707f49cb48b9636751c5b2e7d227e43fba9f47
share_plus: 8875f4f2500512ea181eef553c3e27dba5135aad share_plus: 8875f4f2500512ea181eef553c3e27dba5135aad
shared_preferences_foundation: b4c3b4cddf1c21f02770737f147a3f5da9d39695 shared_preferences_foundation: fcdcbc04712aee1108ac7fda236f363274528f78
smart_auth: 4bedbc118723912d0e45a07e8ab34039c19e04f2 smart_auth: 4bedbc118723912d0e45a07e8ab34039c19e04f2
sqflite: 673a0e54cc04b7d6dba8d24fb8095b31c3a99eec sqflite: 673a0e54cc04b7d6dba8d24fb8095b31c3a99eec
system_info_plus: 5393c8da281d899950d751713575fbf91c7709aa system_info_plus: 5393c8da281d899950d751713575fbf91c7709aa
url_launcher_ios: 6116280ddcfe98ab8820085d8d76ae7449447586 url_launcher_ios: 5334b05cef931de560670eeae103fd3e431ac3fe
veilid: f5c2e662f91907b30cf95762619526ac3e4512fd veilid: f5c2e662f91907b30cf95762619526ac3e4512fd
PODFILE CHECKSUM: 5d504085cd7c7a4d71ee600d7af087cb60ab75b2 PODFILE CHECKSUM: 5d504085cd7c7a4d71ee600d7af087cb60ab75b2

View File

@ -139,6 +139,7 @@
9705A1C41CF9048500538489 /* Embed Frameworks */, 9705A1C41CF9048500538489 /* Embed Frameworks */,
3B06AD1E1E4923F5004D2608 /* Thin Binary */, 3B06AD1E1E4923F5004D2608 /* Thin Binary */,
02C44F9283ADDE9FAAA73512 /* [CP] Embed Pods Frameworks */, 02C44F9283ADDE9FAAA73512 /* [CP] Embed Pods Frameworks */,
61BE8A90522682C17620991D /* [CP] Copy Pods Resources */,
); );
buildRules = ( buildRules = (
); );
@ -230,6 +231,23 @@
shellPath = /bin/sh; shellPath = /bin/sh;
shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" embed_and_thin"; shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" embed_and_thin";
}; };
61BE8A90522682C17620991D /* [CP] Copy Pods Resources */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputFileListPaths = (
"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-resources-${CONFIGURATION}-input-files.xcfilelist",
);
name = "[CP] Copy Pods Resources";
outputFileListPaths = (
"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-resources-${CONFIGURATION}-output-files.xcfilelist",
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-resources.sh\"\n";
showEnvVarsInLog = 0;
};
9740EEB61CF901F6004384FC /* Run Script */ = { 9740EEB61CF901F6004384FC /* Run Script */ = {
isa = PBXShellScriptBuildPhase; isa = PBXShellScriptBuildPhase;
alwaysOutOfDate = 1; alwaysOutOfDate = 1;

View File

@ -59,6 +59,13 @@
ReferencedContainer = "container:Runner.xcodeproj"> ReferencedContainer = "container:Runner.xcodeproj">
</BuildableReference> </BuildableReference>
</BuildableProductRunnable> </BuildableProductRunnable>
<EnvironmentVariables>
<EnvironmentVariable
key = "IDEPreferLogStreaming"
value = "YES"
isEnabled = "YES">
</EnvironmentVariable>
</EnvironmentVariables>
</LaunchAction> </LaunchAction>
<ProfileAction <ProfileAction
buildConfiguration = "Profile" buildConfiguration = "Profile"

View File

@ -127,6 +127,14 @@ class _DeveloperPageState extends State<DeveloperPage> {
} }
} }
Future<void> copyAll(BuildContext context) async {
final text = globalDebugTerminal.buffer.getText();
await Clipboard.setData(ClipboardData(text: text));
if (context.mounted) {
showInfoToast(context, translate('developer.copied_all'));
}
}
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
final theme = Theme.of(context); final theme = Theme.of(context);
@ -157,6 +165,13 @@ class _DeveloperPageState extends State<DeveloperPage> {
: () async { : () async {
await copySelection(context); await copySelection(context);
}), }),
IconButton(
icon: const Icon(Icons.copy_all),
color: scale.primaryScale.primaryText,
disabledColor: scale.primaryScale.primaryText.withAlpha(0x3F),
onPressed: () async {
await copyAll(context);
}),
IconButton( IconButton(
icon: const Icon(Icons.clear_all), icon: const Icon(Icons.clear_all),
color: scale.primaryScale.primaryText, color: scale.primaryScale.primaryText,
@ -243,54 +258,60 @@ class _DeveloperPageState extends State<DeveloperPage> {
).paddingLTRB(0, 0, 8, 0) ).paddingLTRB(0, 0, 8, 0)
], ],
), ),
body: SafeArea( body: GestureDetector(
child: Column(children: [ onTap: () => FocusScope.of(context).unfocus(),
Stack(alignment: AlignmentDirectional.center, children: [ child: SafeArea(
Image.asset('assets/images/ellet.png'), child: Column(children: [
TerminalView(globalDebugTerminal, Stack(alignment: AlignmentDirectional.center, children: [
textStyle: kDefaultTerminalStyle, Image.asset('assets/images/ellet.png'),
controller: _terminalController, TerminalView(globalDebugTerminal,
//autofocus: true, textStyle: kDefaultTerminalStyle,
backgroundOpacity: _showEllet ? 0.75 : 1.0, controller: _terminalController,
onSecondaryTapDown: (details, offset) async { keyboardType: TextInputType.none,
await copySelection(context); //autofocus: true,
}) backgroundOpacity: _showEllet ? 0.75 : 1.0,
]).expanded(), onSecondaryTapDown: (details, offset) async {
TextField( await copySelection(context);
controller: _debugCommandController, })
decoration: InputDecoration( ]).expanded(),
filled: true, TextField(
contentPadding: const EdgeInsets.fromLTRB(8, 2, 8, 2), controller: _debugCommandController,
enabledBorder: OutlineInputBorder( onTapOutside: (event) {
borderRadius: BorderRadius.circular(8), FocusManager.instance.primaryFocus?.unfocus();
borderSide: BorderSide.none), },
border: OutlineInputBorder( decoration: InputDecoration(
borderRadius: BorderRadius.circular(8), filled: true,
), contentPadding: const EdgeInsets.fromLTRB(8, 2, 8, 2),
fillColor: scale.primaryScale.subtleBackground, enabledBorder: OutlineInputBorder(
hintText: translate('developer.command'), borderRadius: BorderRadius.circular(8),
suffixIcon: IconButton( borderSide: BorderSide.none),
icon: Icon(Icons.send, border: OutlineInputBorder(
color: _debugCommandController.text.isEmpty borderRadius: BorderRadius.circular(8),
? scale.primaryScale.primary.withAlpha(0x3F) ),
: scale.primaryScale.primary), fillColor: scale.primaryScale.subtleBackground,
onPressed: _debugCommandController.text.isEmpty hintText: translate('developer.command'),
? null suffixIcon: IconButton(
: () async { icon: Icon(Icons.send,
final debugCommand = _debugCommandController.text; color: _debugCommandController.text.isEmpty
_debugCommandController.clear(); ? scale.primaryScale.primary.withAlpha(0x3F)
await _sendDebugCommand(debugCommand); : scale.primaryScale.primary),
}, onPressed: _debugCommandController.text.isEmpty
)), ? null
onChanged: (_) { : () async {
setState(() => {}); final debugCommand = _debugCommandController.text;
}, _debugCommandController.clear();
onSubmitted: (debugCommand) async { await _sendDebugCommand(debugCommand);
_debugCommandController.clear(); },
await _sendDebugCommand(debugCommand); )),
}, onChanged: (_) {
).paddingAll(4) setState(() => {});
]))); },
onSubmitted: (debugCommand) async {
_debugCommandController.clear();
await _sendDebugCommand(debugCommand);
},
).paddingAll(4)
]))));
} }
@override @override