Skip to content

Commit

Permalink
ready for a new release
Browse files Browse the repository at this point in the history
  • Loading branch information
DXie123 committed Nov 8, 2019
1 parent cc84b5d commit 53773ed
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 18 deletions.
7 changes: 5 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,11 @@ A scientific & intutive calculator written in Flutter.

## ScreenShot
<div align="center">
<img src="https://s2.ax1x.com/2019/10/20/KKUwuD.png" height=300>
<img src="https://s2.ax1x.com/2019/10/20/KKUUgK.png" height=300>
<img src="https://s2.ax1x.com/2019/11/08/MZumss.png" height=300>
<img src="https://s2.ax1x.com/2019/11/08/MZueMj.png" height=300>
<img src="https://s2.ax1x.com/2019/11/08/MZuQoV.png" height=300>
<img src="https://s2.ax1x.com/2019/11/08/MZKK6H.png" height=300>
<img src="https://s2.ax1x.com/2019/11/08/MZu5Y8.png" height=300>
<img src="https://s2.ax1x.com/2019/10/20/KKUajO.png" height=300>
</div>

Expand Down
17 changes: 10 additions & 7 deletions lib/src/mathmodel.dart
Original file line number Diff line number Diff line change
Expand Up @@ -92,19 +92,22 @@ class MathModel with ChangeNotifier {
}

class MatrixModel with ChangeNotifier {
List<String> _matrixExpHistory = [''];
List<String> _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();
}

Expand All @@ -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();
}

Expand Down
14 changes: 5 additions & 9 deletions lib/src/result.dart
Original file line number Diff line number Diff line change
Expand Up @@ -39,18 +39,14 @@ class _ResultState extends State<Result> with TickerProviderStateMixin {
alignment: Alignment.centerRight,
child: Consumer<MathModel>(
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,
Expand Down

0 comments on commit 53773ed

Please sign in to comment.