From 380a1670f0d8f1a965cb9e9b956d251fb2ffc733 Mon Sep 17 00:00:00 2001 From: Josh Soref <2119212+jsoref@users.noreply.github.com> Date: Mon, 9 Jan 2023 02:49:36 -0500 Subject: [PATCH] spelling: chosen Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> --- .../widgets/kb_layout_type_chooser.dart | 32 +++++++++---------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/flutter/lib/desktop/widgets/kb_layout_type_chooser.dart b/flutter/lib/desktop/widgets/kb_layout_type_chooser.dart index cfbdb0c4e..58a8f7109 100644 --- a/flutter/lib/desktop/widgets/kb_layout_type_chooser.dart +++ b/flutter/lib/desktop/widgets/kb_layout_type_chooser.dart @@ -6,7 +6,7 @@ import 'package:flutter_hbb/models/platform_model.dart'; import '../../common.dart'; -typedef KBChoosedCallback = Future Function(String); +typedef KBChosenCallback = Future Function(String); const double _kImageMarginVertical = 6.0; const double _kImageMarginHorizontal = 10.0; @@ -25,12 +25,12 @@ const _kKBLayoutImageMap = { class _KBImage extends StatelessWidget { final String kbLayoutType; final double imageWidth; - final RxString choosedType; + final RxString chosenType; const _KBImage({ Key? key, required this.kbLayoutType, required this.imageWidth, - required this.choosedType, + required this.chosenType, }) : super(key: key); @override @@ -40,7 +40,7 @@ class _KBImage extends StatelessWidget { decoration: BoxDecoration( borderRadius: BorderRadius.circular(_kBorderRadius), border: Border.all( - color: choosedType.value == kbLayoutType + color: chosenType.value == kbLayoutType ? _kImageBorderColor : Colors.transparent, width: _kImageBoarderWidth, @@ -66,13 +66,13 @@ class _KBImage extends StatelessWidget { class _KBChooser extends StatelessWidget { final String kbLayoutType; final double imageWidth; - final RxString choosedType; - final KBChoosedCallback cb; + final RxString chosenType; + final KBChosenCallback cb; const _KBChooser({ Key? key, required this.kbLayoutType, required this.imageWidth, - required this.choosedType, + required this.chosenType, required this.cb, }) : super(key: key); @@ -81,7 +81,7 @@ class _KBChooser extends StatelessWidget { onChanged(String? v) async { if (v != null) { if (await cb(v)) { - choosedType.value = v; + chosenType.value = v; } } } @@ -95,7 +95,7 @@ class _KBChooser extends StatelessWidget { child: _KBImage( kbLayoutType: kbLayoutType, imageWidth: imageWidth, - choosedType: choosedType, + chosenType: chosenType, ), style: TextButton.styleFrom(padding: EdgeInsets.zero), ), @@ -105,7 +105,7 @@ class _KBChooser extends StatelessWidget { Obx(() => Radio( splashRadius: 0, value: kbLayoutType, - groupValue: choosedType.value, + groupValue: chosenType.value, onChanged: onChanged, )), Text(kbLayoutType), @@ -121,14 +121,14 @@ class _KBChooser extends StatelessWidget { } class KBLayoutTypeChooser extends StatelessWidget { - final RxString choosedType; + final RxString chosenType; final double width; final double height; final double dividerWidth; - final KBChoosedCallback cb; + final KBChosenCallback cb; KBLayoutTypeChooser({ Key? key, - required this.choosedType, + required this.chosenType, required this.width, required this.height, required this.dividerWidth, @@ -147,7 +147,7 @@ class KBLayoutTypeChooser extends StatelessWidget { _KBChooser( kbLayoutType: _kKBLayoutTypeISO, imageWidth: imageWidth, - choosedType: choosedType, + chosenType: chosenType, cb: cb, ), VerticalDivider( @@ -156,7 +156,7 @@ class KBLayoutTypeChooser extends StatelessWidget { _KBChooser( kbLayoutType: _kKBLayoutTypeNotISO, imageWidth: imageWidth, - choosedType: choosedType, + chosenType: chosenType, cb: cb, ), ], @@ -208,7 +208,7 @@ showKBLayoutTypeChooser( title: Text('${translate('Select local keyboard type')} ($localPlatform)'), content: KBLayoutTypeChooser( - choosedType: KBLayoutType, + chosenType: KBLayoutType, width: 360, height: 200, dividerWidth: 4.0,