premium_activated_view.dart 3.2 KB
import 'package:doublefeel_flutter/app/ext/font_ext.dart';
import 'package:doublefeel_flutter/core/util/size_extensions.dart';
import 'package:doublefeel_flutter/l10n/l10n_extensions.dart';
import 'package:doublefeel_flutter/r.dart';
import 'package:flutter/material.dart';
import 'package:get/get.dart';

import '../controllers/premium_activated_controller.dart';

class PremiumActivatedView extends GetView<PremiumActivatedController> {
  const PremiumActivatedView({super.key});

  @override
  Widget build(BuildContext context) {
    return Container(
      decoration: const BoxDecoration(
        gradient: LinearGradient(
          begin: Alignment.topCenter,
          end: Alignment.bottomCenter,
          colors: [
            Color(0xFFE6DBFF),
            Color(0xFFEDE4FF),
            Color(0xFFEEE6FF),
            Color(0xFFF9F6FF)
          ],
        ),
      ),
      child: Scaffold(
        backgroundColor: Colors.transparent,
        appBar: AppBar(
          backgroundColor: Colors.transparent,
          toolbarHeight: 44.w,
          centerTitle: true,
          title: Text(
            "",
            style: TextStyle(
              fontSize: 16,
              color: Color(0xFF000000),
              fontWeight: FontWeightExt.semibold,
            ),
          ),
          leading: IconButton(
            highlightColor: Colors.transparent,
            padding: EdgeInsets.zero,
            onPressed: () {
              controller.executeBackLogic();
            },
            icon: Image(
              width: 24.w,
              height: 24.w,
              alignment: Alignment.centerLeft,
              image: AssetImage(R.assetsImagesNavBackIcon),
            ),
          ),
        ),
        body: _buildContentView(context),
      ),
    );
  }

  Widget _buildContentView(BuildContext context) {
    return Column(
      mainAxisAlignment: MainAxisAlignment.start,
      crossAxisAlignment: CrossAxisAlignment.center,
      children: [
        Container(
          width: double.infinity,
          height: 360.h,
          color: Colors.red,
        ),
        SizedBox(height: 20),
        Text(
          context.l10n.premiumActivatedTitle,
          style: const TextStyle(
              fontSize: 20,
              color: Color(0xFF0F0F11),
              fontWeight: FontWeightExt.semibold),
          textAlign: TextAlign.center,
        ),
        SizedBox(height: 8),
        Padding(
          padding: const EdgeInsets.symmetric(horizontal: 24.0),
          child: Text(context.l10n.premiumActivatedDescription,
              style: const TextStyle(fontSize: 14, color: Color(0xFF0F0F11)),
              textAlign: TextAlign.center),
        ),
        Expanded(child: Container()),
        Container(
          width: 280.dp,
          height: 48.dp,
          decoration: BoxDecoration(
            color: Color(0xFF845EEE),
            borderRadius: BorderRadius.circular(24.dp),
          ),
          alignment: Alignment.center,
          child: Text(context.l10n.premiumActivatedContinue,
              style: const TextStyle(
                  fontSize: 16,
                  color: Colors.white,
                  fontWeight: FontWeightExt.bold)),
        ),
        SizedBox(height: 36),
      ],
    );
  }
}