Получение информации о пользователе, разные исправления
This commit is contained in:
30
lib/faq.dart
30
lib/faq.dart
@@ -11,21 +11,25 @@ class Entry {
|
||||
}
|
||||
|
||||
class EntryItem extends StatelessWidget {
|
||||
|
||||
const EntryItem(this.entry);
|
||||
|
||||
final Entry entry;
|
||||
|
||||
Widget _buildTiles(Entry root) {
|
||||
return new ExpansionTile(
|
||||
Widget _buildTiles(BuildContext context, Entry root) {
|
||||
EdgeInsets margin = new EdgeInsets.only(left: 20.0, right: 20.0);
|
||||
TextStyle titleStyle = Theme.of(context).textTheme.button.copyWith(fontWeight: FontWeight.bold, color: faqTitlesColor);
|
||||
return new Container(margin: margin, child: new Card(child: new ExpansionTile(
|
||||
key: new PageStorageKey<Entry>(root),
|
||||
title: new Text(root.title),
|
||||
children: [new Text(root.text)]
|
||||
);
|
||||
title:new Text(root.title, style: titleStyle),
|
||||
children: [new Container(margin: margin, padding: new EdgeInsets.only(top: 12.0, bottom: 20.0),
|
||||
child: new Text(root.text, style: new TextStyle(fontWeight: FontWeight.w300, color: faqGrey, fontSize: 14.0)),
|
||||
decoration: new BoxDecoration(border: new Border(top: new BorderSide(color: greyTextColor, width: 0.5))))]
|
||||
)));
|
||||
}
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return _buildTiles(entry);
|
||||
return _buildTiles(context, entry);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -34,10 +38,10 @@ class FAQScreen extends StatelessWidget {
|
||||
|
||||
AppBar getAppBar(BuildContext context) {
|
||||
return new AppBar(title: new Text('FAQ', style: new TextStyle(fontSize: 18.0)),
|
||||
backgroundColor: primaryColor, actions: <Widget>[getLogoutButton()]);
|
||||
backgroundColor: primaryColor, actions: <Widget>[getLogoutButton(context)]);
|
||||
}
|
||||
|
||||
getLogoutButton() {
|
||||
getLogoutButton(BuildContext context) {
|
||||
return new IconButton(icon: new Image.asset(logout_png, height: iconHeight, width: iconHeight), onPressed: () => logout(context));
|
||||
}
|
||||
@override
|
||||
@@ -54,10 +58,10 @@ class FAQScreen extends StatelessWidget {
|
||||
|
||||
/// Список с контентом
|
||||
final List<Entry> data = <Entry>[
|
||||
new Entry('Регистрация', registrationGuide),
|
||||
new Entry('Использование', usageGuide),
|
||||
new Entry('Контакты поддержки', supportGuide),
|
||||
new Entry('Использование', commonGuide)
|
||||
new Entry('РЕГИСТРАЦИЯ', registrationGuide),
|
||||
new Entry('ИСПОЛЬЗОВАНИЕ', usageGuide),
|
||||
new Entry('КОНТАКТЫ ПОДДЕРЖКИ', supportGuide),
|
||||
new Entry('ОБЩАЯ ИНФОРМАЦИЯ', commonGuide)
|
||||
];
|
||||
|
||||
/// TODO: Отформатировать строки
|
||||
|
||||
Reference in New Issue
Block a user