123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596 |
- import 'package:flutter/material.dart';
- import 'package:flutter/services.dart';
- import 'package:empty/components/background.dart';
- class SupportScreen extends StatefulWidget {
- @override
- _SupportScreenState createState() => _SupportScreenState();
- }
- class _SupportScreenState extends State<SupportScreen> {
- String termsText = '';
- String privacyText = '';
- readTextFile(String filename) async {
- if( filename == 'terms' ){
- String _termsText = await rootBundle.loadString('assets/files/terms.txt');
- setState(() {
- termsText = _termsText;
- });
- }
- if( filename == 'privacy' ){
- String _privacyText = await rootBundle.loadString('assets/files/privacy.txt');
- setState(() {
- privacyText = _privacyText;
- });
- }
- }
- @override
- void initState() {
- // TODO: implement initState
- super.initState();
- readTextFile('terms');
- readTextFile('privacy');
- }
- @override
- Widget build(BuildContext context) {
- 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('고객센터',style: TextStyle(fontSize: 18),),
- //centerTitle: true,
- backgroundColor: Colors.transparent,
- elevation: 0.0,
- ),
- body: SingleChildScrollView(
- child: Column(
- crossAxisAlignment: CrossAxisAlignment.center,
- children: [
- Row(),
- Padding(
- padding: const EdgeInsets.all(20.0),
- child: Text('앱 사용에 관한 문의 사항은 아래 이메일로 보내주세요',style: Theme.of(context).textTheme.bodyText1),
- ),
- Divider(),
- Text('dabutconsulting@gmail.com',style: Theme.of(context).textTheme.subtitle1),
- Divider(),
- ExpansionTile(
- title: Text('서비스이용약관'),
- children: [
- Divider(),
- ListTile(
- title: Text(termsText),
- )
- ],
- ),
- ExpansionTile(
- title: Text('개인정보취급방침'),
- children: [
- Divider(),
- ListTile(
- title: Text(privacyText),
- )
- ],
- ),
- ],
- ),
- )
- ),
- );
- }
- }
|