Skip to content

Commit fb68b6b

Browse files
author
Jonas Klock
committed
Added iOS hint
1 parent 335c9ac commit fb68b6b

File tree

3 files changed

+57
-17
lines changed

3 files changed

+57
-17
lines changed

lib/views/screen_keyboard_validation.dart

+15-4
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
import 'dart:io';
2+
13
import 'package:flutter/material.dart';
24
import 'package:flutter_keyboard_identifier/views/view_keyboard_identifier.dart';
35

@@ -11,9 +13,18 @@ class ScreenKeyboardIdentifier extends StatelessWidget {
1113
backgroundColor: Theme.of(context).colorScheme.inversePrimary,
1214
title: const Text("Keyboard Identifier Validation"),
1315
),
14-
body: const Center(
15-
child: ViewKeyboardIdentifier(),
16-
),// This trailing comma makes auto-formatting nicer for build methods.
16+
body: Padding(
17+
padding: const EdgeInsets.only(left: 16.0, right: 16.0),
18+
child: Center(
19+
child: Platform.isIOS
20+
? const Text(
21+
"You are using an iOS device.\n"
22+
"This app will only validate Android keyboards.",
23+
textAlign: TextAlign.center,
24+
)
25+
: const ViewKeyboardIdentifier(),
26+
),
27+
),
1728
);
1829
}
19-
}
30+
}

lib/views/view_keyboard_identifier.dart

+6-1
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,12 @@ class _ViewKeyboardIdentifierState extends State<ViewKeyboardIdentifier> {
3131
mainAxisAlignment: MainAxisAlignment.center,
3232
children: [
3333
const Text("Keyboard Identifier:"),
34-
Text(_keyboardIdentifier),
34+
Text(
35+
_keyboardIdentifier,
36+
style: const TextStyle(
37+
fontWeight: FontWeight.bold,
38+
),
39+
),
3540
const SizedBox(height: 16),
3641
Text(
3742
_keyboardIsValid ? "VALID" : "INVALID",

pubspec.lock

+36-12
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,30 @@ packages:
7575
description: flutter
7676
source: sdk
7777
version: "0.0.0"
78+
leak_tracker:
79+
dependency: transitive
80+
description:
81+
name: leak_tracker
82+
sha256: "78eb209deea09858f5269f5a5b02be4049535f568c07b275096836f01ea323fa"
83+
url: "https://pub.dev"
84+
source: hosted
85+
version: "10.0.0"
86+
leak_tracker_flutter_testing:
87+
dependency: transitive
88+
description:
89+
name: leak_tracker_flutter_testing
90+
sha256: b46c5e37c19120a8a01918cfaf293547f47269f7cb4b0058f21531c2465d6ef0
91+
url: "https://pub.dev"
92+
source: hosted
93+
version: "2.0.1"
94+
leak_tracker_testing:
95+
dependency: transitive
96+
description:
97+
name: leak_tracker_testing
98+
sha256: a597f72a664dbd293f3bfc51f9ba69816f84dcd403cdac7066cb3f6003f3ab47
99+
url: "https://pub.dev"
100+
source: hosted
101+
version: "2.0.1"
78102
lints:
79103
dependency: transitive
80104
description:
@@ -87,34 +111,34 @@ packages:
87111
dependency: transitive
88112
description:
89113
name: matcher
90-
sha256: "1803e76e6653768d64ed8ff2e1e67bea3ad4b923eb5c56a295c3e634bad5960e"
114+
sha256: d2323aa2060500f906aa31a895b4030b6da3ebdcc5619d14ce1aada65cd161cb
91115
url: "https://pub.dev"
92116
source: hosted
93-
version: "0.12.16"
117+
version: "0.12.16+1"
94118
material_color_utilities:
95119
dependency: transitive
96120
description:
97121
name: material_color_utilities
98-
sha256: "9528f2f296073ff54cb9fee677df673ace1218163c3bc7628093e7eed5203d41"
122+
sha256: "0e0a020085b65b6083975e499759762399b4475f766c21668c4ecca34ea74e5a"
99123
url: "https://pub.dev"
100124
source: hosted
101-
version: "0.5.0"
125+
version: "0.8.0"
102126
meta:
103127
dependency: transitive
104128
description:
105129
name: meta
106-
sha256: a6e590c838b18133bb482a2745ad77c5bb7715fb0451209e1a7567d416678b8e
130+
sha256: d584fa6707a52763a52446f02cc621b077888fb63b93bbcb1143a7be5a0c0c04
107131
url: "https://pub.dev"
108132
source: hosted
109-
version: "1.10.0"
133+
version: "1.11.0"
110134
path:
111135
dependency: transitive
112136
description:
113137
name: path
114-
sha256: "8829d8a55c13fc0e37127c29fedf290c102f4e40ae94ada574091fe0ff96c917"
138+
sha256: "087ce49c3f0dc39180befefc60fdb4acd8f8620e5682fe2476afd0b3688bb4af"
115139
url: "https://pub.dev"
116140
source: hosted
117-
version: "1.8.3"
141+
version: "1.9.0"
118142
sky_engine:
119143
dependency: transitive
120144
description: flutter
@@ -176,13 +200,13 @@ packages:
176200
url: "https://pub.dev"
177201
source: hosted
178202
version: "2.1.4"
179-
web:
203+
vm_service:
180204
dependency: transitive
181205
description:
182-
name: web
183-
sha256: afe077240a270dcfd2aafe77602b4113645af95d0ad31128cc02bce5ac5d5152
206+
name: vm_service
207+
sha256: b3d56ff4341b8f182b96aceb2fa20e3dcb336b9f867bc0eafc0de10f1048e957
184208
url: "https://pub.dev"
185209
source: hosted
186-
version: "0.3.0"
210+
version: "13.0.0"
187211
sdks:
188212
dart: ">=3.2.4 <4.0.0"

0 commit comments

Comments
 (0)