import 'package:flutter/material.dart';
import 'package:flutter_hooks/flutter_hooks.dart';
import 'package:styled_widget/styled_widget.dart';
import 'package:gap/gap.dart';

import '../../src/version.dart';
import '../../config.dart';

class AboutPage extends HookWidget {
  const AboutPage({super.key});
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(title: const Text('关于')),
      body: ListView(
        children: [
          Column(
            mainAxisAlignment: MainAxisAlignment.center,
            children: [
              Image.asset('images/favicon.png', width: 120, height: 120).clipOval(),
              const SizedBox(height: 20),
              Text(
                '拾糖论坛',
                style: TextStyle(fontWeight: FontWeight.w600, fontSize: 24),
              ),
            ],
          ).constrained(height: 200, width: double.infinity),
          const Divider(height: 16),
          ListTile(
            title: const Text('App 版本'),
            subtitle: Text('v${packageVersion}'),
          ),
        ],
      )
    );
  }
}
