Skip to content

Commit

Permalink
upgrade flutter, tarketSdkVersion and dropdown_button2 library
Browse files Browse the repository at this point in the history
  • Loading branch information
matteo-convertino committed Jul 23, 2024
1 parent 218c9a2 commit 1f42376
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 16 deletions.
2 changes: 1 addition & 1 deletion android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ android {
defaultConfig {
applicationId "com.convertino.otp_manager"
minSdkVersion 21
targetSdkVersion flutter.targetSdkVersion
targetSdkVersion 34 // flutter.targetSdkVersion
versionCode flutterVersionCode.toInteger()
versionName flutterVersionName

Expand Down
32 changes: 20 additions & 12 deletions lib/screens/manual.dart
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ class Manual extends HookWidget {
final animationController =
useAnimationController(duration: const Duration(milliseconds: 150));
final animation =
useAnimation(IntTween(begin: 30, end: 0).animate(animationController));
useAnimation(IntTween(begin: 3, end: 0).animate(animationController));

useEffect(() {
if (context.read<ManualBloc>().state.codeTypeValue == "hotp") {
Expand Down Expand Up @@ -190,26 +190,28 @@ class Manual extends HookWidget {
Row(
children: [
Expanded(
flex: 80,
flex: 7,
child: Padding(
padding: const EdgeInsets.all(15.0),
child: DropdownButtonFormField2(
decoration: const InputDecoration(
border: OutlineInputBorder(),
labelText: "Type of code",
),
dropdownDecoration: BoxDecoration(
borderRadius: BorderRadius.circular(4.0),
dropdownStyleData: DropdownStyleData(
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(4.0),
),
),
value: state.codeTypeValue,
items: const [
DropdownMenuItem(
value: "totp",
child: Text("Based on time (TOTP)"),
child: Text("Time based (TOTP)"),
),
DropdownMenuItem(
value: "hotp",
child: Text("Based on counter (HOTP)"),
child: Text("Counter based (HOTP)"),
),
],
onChanged: (String? value) {
Expand All @@ -233,8 +235,10 @@ class Manual extends HookWidget {
border: OutlineInputBorder(),
labelText: "Interval",
),
dropdownDecoration: BoxDecoration(
borderRadius: BorderRadius.circular(4.0),
dropdownStyleData: DropdownStyleData(
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(4.0),
),
),
value: state.intervalValue,
items: const [
Expand Down Expand Up @@ -264,8 +268,10 @@ class Manual extends HookWidget {
border: OutlineInputBorder(),
labelText: "Algorithm",
),
dropdownDecoration: BoxDecoration(
borderRadius: BorderRadius.circular(4.0),
dropdownStyleData: DropdownStyleData(
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(4.0),
),
),
value: state.algorithmValue,
items: const [
Expand Down Expand Up @@ -299,8 +305,10 @@ class Manual extends HookWidget {
border: OutlineInputBorder(),
labelText: "Digits",
),
dropdownDecoration: BoxDecoration(
borderRadius: BorderRadius.circular(4.0),
dropdownStyleData: DropdownStyleData(
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(4.0),
),
),
value: state.digitsValue,
items: const [
Expand Down
1 change: 0 additions & 1 deletion lib/screens/settings.dart
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,6 @@ class Settings extends HookWidget {
title: const Text("Password ask time"),
trailing: DropdownButtonHideUnderline(
child: DropdownButton2<String>(
dropdownWidth: 150.0,
items: askTimeOptions
.map((String item) => DropdownMenuItem<String>(
value: item,
Expand Down
4 changes: 2 additions & 2 deletions pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ publish_to: 'none' # Remove this line if you wish to publish to pub.dev
# In iOS, build-name is used as CFBundleShortVersionString while build-number used as CFBundleVersion.
# Read more about iOS versioning at
# https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html
version: 1.5.2+24
version: 1.5.3+25

environment:
sdk: ">=2.16.2 <3.0.0"
Expand Down Expand Up @@ -43,7 +43,7 @@ dependencies:
objectbox: ^1.5.0 # Apache-2.0 (Trademark use)
objectbox_flutter_libs: any # Apache-2.0 (Trademark use)
nextcloud: ^5.0.2
dropdown_button2: 1.6.2 # MIT
dropdown_button2: ^2.3.9 # MIT
mobile_scanner: ^2.0.0 # BSD-3-Clause
image_picker: ^0.8.5+3 # Apache-2.0, BSD-3-Clause
provider: ^6.0.3 # MIT
Expand Down

0 comments on commit 1f42376

Please sign in to comment.