upgrade packages
This commit is contained in:
@@ -10,7 +10,7 @@ import 'package:fcs/pages/widgets/local_text.dart';
|
||||
import 'package:flutter/cupertino.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:provider/provider.dart';
|
||||
import 'package:zefyrka/zefyrka.dart';
|
||||
// import 'package:zefyrka/zefyrka.dart';
|
||||
|
||||
typedef void ProfileCallback();
|
||||
|
||||
@@ -23,9 +23,9 @@ class TermPage extends StatefulWidget {
|
||||
}
|
||||
|
||||
class _TermPageState extends State<TermPage> {
|
||||
late ZefyrController _controller;
|
||||
// late ZefyrController _controller;
|
||||
late FocusNode _focusNode;
|
||||
late NotusDocument document = new NotusDocument();
|
||||
// late NotusDocument document = new NotusDocument();
|
||||
bool isLoading = false;
|
||||
|
||||
@override
|
||||
@@ -34,18 +34,18 @@ class _TermPageState extends State<TermPage> {
|
||||
_focusNode = FocusNode();
|
||||
}
|
||||
|
||||
NotusDocument _loadDocument(Setting? setting) {
|
||||
bool isEng = Provider.of<LanguageModel>(context).isEng;
|
||||
String? term = isEng ? (setting!.termsEng ?? "") : (setting!.termsMm ?? "");
|
||||
late NotusDocument doc;
|
||||
try {
|
||||
doc = NotusDocument.fromJson(jsonDecode(term));
|
||||
} catch (e) {}
|
||||
if (doc == null) {
|
||||
doc = NotusDocument();
|
||||
}
|
||||
return doc;
|
||||
}
|
||||
// NotusDocument _loadDocument(Setting? setting) {
|
||||
// bool isEng = Provider.of<LanguageModel>(context).isEng;
|
||||
// String? term = isEng ? (setting!.termsEng ?? "") : (setting!.termsMm ?? "");
|
||||
// late NotusDocument doc;
|
||||
// try {
|
||||
// doc = NotusDocument.fromJson(jsonDecode(term));
|
||||
// } catch (e) {}
|
||||
// if (doc == null) {
|
||||
// doc = NotusDocument();
|
||||
// }
|
||||
// return doc;
|
||||
// }
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
@@ -85,11 +85,11 @@ class _TermPageState extends State<TermPage> {
|
||||
]
|
||||
: [],
|
||||
),
|
||||
body: ZefyrEditor(
|
||||
padding: EdgeInsets.all(16),
|
||||
controller: ZefyrController(_loadDocument(setting)),
|
||||
focusNode: _focusNode,
|
||||
),
|
||||
// body: ZefyrEditor(
|
||||
// padding: EdgeInsets.all(16),
|
||||
// controller: ZefyrController(_loadDocument(setting)),
|
||||
// focusNode: _focusNode,
|
||||
// ),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user