12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273 |
- import 'package:flutter/material.dart';
- import 'package:empty/components/background.dart';
- import 'package:empty/constants.dart';
- class ConfigScreen extends StatefulWidget {
- @override
- _ConfigScreenState createState() => _ConfigScreenState();
- }
- class _ConfigScreenState extends State<ConfigScreen> {
- @override
- Widget build(BuildContext context) {
- final _list = [
- // {"title": "계정관리","subtitle": "Account info","icon": Icons.person,"page": "profile"},
- {"title": "공지사항","subtitle": "Notice","icon": Icons.campaign,"page": "notice"},
- {"title": "자주하는질문","subtitle": "Frequently asked questions","icon": Icons.forum,"page": "faq"},
- {"title": "고객센터","subtitle": "Service center","icon": Icons.support_agent,"page": "support"},
- {"title": "다붓컨설팅","subtitle": "About dabut","icon": Icons.business,"page": "about"},
- //{"title": "언어선택","subtitle": "Language selection","icon": Icons.translate,"page": "language"},
- //{"title": "콘텐츠알림","subtitle": "Content Notification","icon": Icons.notifications_active,"page": "alarm"},
- ];
- return Background(
- image: Container(
- height: double.infinity,
- width: double.infinity,
- decoration: BoxDecoration(
- image: DecorationImage(
- image: AssetImage('assets/images/background_config.png'),
- fit: BoxFit.cover
- )
- ),
- ),
- child: Scaffold(
- backgroundColor: Colors.transparent,
- appBar: AppBar(
- // title: Text(_title,style: TextStyle(fontSize: 18),),
- //centerTitle: true,
- backgroundColor: Colors.transparent,
- elevation: 0.0,
- ),
- body: ListView.separated(
- itemCount: _list.length,
- separatorBuilder: (BuildContext context, int index) => Divider(thickness: 0.2,color: Colors.grey,height: 0.2,),
- itemBuilder: (BuildContext context, int index) {
- return ListTile(
- title: Text(_list[index]['title'],style: Theme.of(context).textTheme.bodyText1),
- subtitle: Text(_list[index]['subtitle'],style: Theme.of(context).textTheme.subtitle1),
- leading: CircleAvatar(
- backgroundColor: Colors.green[200],
- radius: 20,
- child: Icon(_list[index]['icon'],color: Colors.white,),
- ),
- trailing: Icon(Icons.arrow_forward_ios,color: Colors.white),
- onTap: (){
- // kEmptySocial
- if( _list[index]['page'] == 'profile' && kEmptySocial == null ) {
- Navigator.pushNamed(context, '/login' );
- } else {
- Navigator.pushNamed(context, '/' + _list[index]['page'] );
- }
- },
- );
- },
- ),
- ),
- );
- }
- }
|