mirror of
https://github.com/inventree/inventree-app.git
synced 2025-06-12 18:25:26 +00:00
Start of unit tests for the actual API code
This commit is contained in:
14
lib/l10.dart
14
lib/l10.dart
@ -7,16 +7,18 @@ import "package:flutter/material.dart";
|
||||
// Shortcut function to reduce boilerplate!
|
||||
I18N L10()
|
||||
{
|
||||
BuildContext? _ctx = OneContext().context;
|
||||
if (OneContext.hasContext) {
|
||||
BuildContext? _ctx = OneContext().context;
|
||||
|
||||
if (_ctx != null) {
|
||||
I18N? i18n = I18N.of(_ctx);
|
||||
if (_ctx != null) {
|
||||
I18N? i18n = I18N.of(_ctx);
|
||||
|
||||
if (i18n != null) {
|
||||
return i18n;
|
||||
if (i18n != null) {
|
||||
return i18n;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Fallback for "null" context
|
||||
return I18NEn();
|
||||
return I18NEn();
|
||||
}
|
Reference in New Issue
Block a user