1
0
Fork 0
mirror of https://github.com/Nioux/AideDeJeu.git synced 2025-10-30 15:06:06 +00:00

async / await

This commit is contained in:
Yan Maniez 2020-02-19 16:00:01 +01:00
parent 2911bc359b
commit f581c6a886

View file

@ -128,16 +128,20 @@ class _MyHomePageState extends State<MyHomePage> {
), ),
); );
//styleSheet = MarkdownStyleSheet.fromTheme(theme); styleSheet = MarkdownStyleSheet.fromTheme(theme).copyWith(
styleSheet = MarkdownStyleSheet(
//p: TextStyle(fontSize: 14.0, fontFamily: 'LinuxLibertine'),
tableColumnWidth: IntrinsicColumnWidth(), tableColumnWidth: IntrinsicColumnWidth(),
tableCellsPadding: EdgeInsets.all(0.2)); tableCellsPadding: EdgeInsets.all(0.2));
getItemWithId(this.id) /*getItemWithId(this.id)
.then((item) => loadChildrenItems(item).then((items) => setItem(item))) .then((item) => loadChildrenItems(item).then((items) => setItem(item)))
.catchError((error) => print(error)); .catchError((error) => print(error));*/
loadItem();
}
loadItem() async {
var item = await getItemWithId(this.id);
var items = await loadChildrenItems(item);
setItem(item);
} }
final Widget svg = SvgPicture.asset( final Widget svg = SvgPicture.asset(