fix crash at start + yellow underline
parent
80d481c438
commit
fab892303d
|
@ -1,4 +1,4 @@
|
||||||
package com.example.base_converter
|
package com.emamaker.base_converter
|
||||||
|
|
||||||
import io.flutter.embedding.android.FlutterActivity
|
import io.flutter.embedding.android.FlutterActivity
|
||||||
|
|
||||||
|
|
|
@ -94,7 +94,6 @@ String baseToDecimal(String number, String pBase) {
|
||||||
n += number[i + 2];
|
n += number[i + 2];
|
||||||
n += number[i + 3];
|
n += number[i + 3];
|
||||||
String n1 = baseToDecimal(n, "2");
|
String n1 = baseToDecimal(n, "2");
|
||||||
print(n1);
|
|
||||||
if (int.parse(n1) > 9) return "error-bcd-greater-nine";
|
if (int.parse(n1) > 9) return "error-bcd-greater-nine";
|
||||||
res += n1;
|
res += n1;
|
||||||
}
|
}
|
||||||
|
|
|
@ -143,17 +143,17 @@ class _MyHomePageState extends State<MyHomePage> {
|
||||||
"Error: a digit is greater than or equal to the base");
|
"Error: a digit is greater than or equal to the base");
|
||||||
case "":
|
case "":
|
||||||
return RichText(
|
return RichText(
|
||||||
text: TextSpan(
|
text: const TextSpan(
|
||||||
text: '',
|
text: '',
|
||||||
style: DefaultTextStyle.of(context).style,
|
style: TextStyle(decoration: TextDecoration.none),
|
||||||
children: const <TextSpan>[],
|
children: <TextSpan>[],
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
default:
|
default:
|
||||||
return RichText(
|
return RichText(
|
||||||
text: TextSpan(
|
text: TextSpan(
|
||||||
text: '',
|
text: '',
|
||||||
style: DefaultTextStyle.of(context).style,
|
style: const TextStyle(decoration: TextDecoration.none),
|
||||||
children: <TextSpan>[
|
children: <TextSpan>[
|
||||||
mainNumber(_controller.text),
|
mainNumber(_controller.text),
|
||||||
baseSubtitle("($savedFromBase)"),
|
baseSubtitle("($savedFromBase)"),
|
||||||
|
@ -169,13 +169,13 @@ class _MyHomePageState extends State<MyHomePage> {
|
||||||
return RichText(
|
return RichText(
|
||||||
text: TextSpan(
|
text: TextSpan(
|
||||||
text: '',
|
text: '',
|
||||||
style: DefaultTextStyle.of(context).style,
|
style: const TextStyle(decoration: TextDecoration.none),
|
||||||
children: <TextSpan>[
|
children: <TextSpan>[
|
||||||
TextSpan(
|
TextSpan(
|
||||||
text: content,
|
text: content,
|
||||||
style: const TextStyle(
|
style: const TextStyle(
|
||||||
color: Colors.black,
|
color: Colors.black,
|
||||||
fontSize: 12,
|
fontSize: 16,
|
||||||
fontWeight: FontWeight.normal,
|
fontWeight: FontWeight.normal,
|
||||||
fontFamily: "Roboto")),
|
fontFamily: "Roboto")),
|
||||||
],
|
],
|
||||||
|
|
Loading…
Reference in New Issue