fix crash at start + yellow underline

mobile
EmaMaker 2021-10-13 12:29:58 +02:00
parent 80d481c438
commit fab892303d
3 changed files with 7 additions and 8 deletions

View File

@ -1,4 +1,4 @@
package com.example.base_converter
package com.emamaker.base_converter
import io.flutter.embedding.android.FlutterActivity

View File

@ -94,7 +94,6 @@ String baseToDecimal(String number, String pBase) {
n += number[i + 2];
n += number[i + 3];
String n1 = baseToDecimal(n, "2");
print(n1);
if (int.parse(n1) > 9) return "error-bcd-greater-nine";
res += n1;
}

View File

@ -143,17 +143,17 @@ class _MyHomePageState extends State<MyHomePage> {
"Error: a digit is greater than or equal to the base");
case "":
return RichText(
text: TextSpan(
text: const TextSpan(
text: '',
style: DefaultTextStyle.of(context).style,
children: const <TextSpan>[],
style: TextStyle(decoration: TextDecoration.none),
children: <TextSpan>[],
),
);
default:
return RichText(
text: TextSpan(
text: '',
style: DefaultTextStyle.of(context).style,
style: const TextStyle(decoration: TextDecoration.none),
children: <TextSpan>[
mainNumber(_controller.text),
baseSubtitle("($savedFromBase)"),
@ -169,13 +169,13 @@ class _MyHomePageState extends State<MyHomePage> {
return RichText(
text: TextSpan(
text: '',
style: DefaultTextStyle.of(context).style,
style: const TextStyle(decoration: TextDecoration.none),
children: <TextSpan>[
TextSpan(
text: content,
style: const TextStyle(
color: Colors.black,
fontSize: 12,
fontSize: 16,
fontWeight: FontWeight.normal,
fontFamily: "Roboto")),
],