diff --git a/README.md b/README.md
index 5b4b96f..c5937ea 100644
--- a/README.md
+++ b/README.md
@@ -8,8 +8,11 @@ A scientific & intutive calculator written in Flutter.
## ScreenShot
diff --git a/lib/src/mathmodel.dart b/lib/src/mathmodel.dart
index dbb0610..42b64cf 100644
--- a/lib/src/mathmodel.dart
+++ b/lib/src/mathmodel.dart
@@ -92,19 +92,22 @@ class MathModel with ChangeNotifier {
}
class MatrixModel with ChangeNotifier {
- List _matrixExpHistory = [''];
+ List _matrixExpHistory = [];
String _matrixExression;
Matrix _matrix;
int _precision;
- bool single = true;
- bool square = true;
+ bool _single = true;
+ bool _square = true;
+
+ bool get single => _single;
+ bool get square => _square;
void updateExpression(String expression) {
_matrixExression = expression;
final mp = MatrixParser(_matrixExression, precision: _precision);
_matrix = mp.parse();
- single = mp.single;
- square = mp.square;
+ _single = mp.single;
+ _square = mp.square;
notifyListeners();
}
@@ -116,8 +119,8 @@ class MatrixModel with ChangeNotifier {
void norm() {
_matrixExpHistory.add(_matrixExression);
_matrixExression = _matrix.det().toString();
- single = false;
- square = false;
+ _single = false;
+ _square = false;
notifyListeners();
}
diff --git a/lib/src/result.dart b/lib/src/result.dart
index a7592f0..44f82a6 100644
--- a/lib/src/result.dart
+++ b/lib/src/result.dart
@@ -39,18 +39,14 @@ class _ResultState extends State with TickerProviderStateMixin {
alignment: Alignment.centerRight,
child: Consumer(
builder: (_, model, __) {
- final _textController = TextEditingController();
+ String text;
if (model.result!='' && animationController.status == AnimationStatus.dismissed) {
- _textController.text = '= ' + model.result;
+ text = '= ' + model.result;
} else {
- _textController.text = model.result;
+ text = model.result;
}
- return TextField(
- controller: _textController,
- readOnly: true,
- textAlign: TextAlign.right,
- autofocus: true,
- decoration: null,
+ return SelectableText(
+ text,
style: TextStyle(
fontFamily: 'Minion-Pro',
fontSize: animation.value - 5,