Unit tests added

This commit is contained in:
2022-09-27 21:46:30 +01:00
parent 8cc19f0dc9
commit 372f5611fe
10 changed files with 299 additions and 2 deletions

View File

@@ -34,7 +34,7 @@ class HomePage extends BaseStatelessWidget<MainViewModel> {
model.setConversionPair(selected1, selected2);
}),
ConverterEditText("Enter conversion from", controller1, (input) => {
controller2.text = model.convertInput(input, SelectionType.conversionFrom)
controller2.text = model.convertInput(input?.trim(), SelectionType.conversionFrom)
})
],
),
@@ -48,7 +48,7 @@ class HomePage extends BaseStatelessWidget<MainViewModel> {
model.setConversionPair(selected1, selected2);
}),
ConverterEditText("Enter conversion from", controller2, (input) => {
controller1.text = model.convertInput(input, SelectionType.conversionTo)
controller1.text = model.convertInput(input?.trim(), SelectionType.conversionTo)
})
],
),

View File

@@ -11,6 +11,7 @@ GetIt locator = GetIt.instance;
void setupLocator() {
final dio = Dio();
locator.registerLazySingleton(() => PreferenceProvider());
locator.registerLazySingleton(() => CurrencyApi(dio));
locator.registerLazySingleton(() => BackupCurrencyApi(dio));