content: 
  import 'dart:io';
  
  import 'package:flutter/material.dart';
  import 'package:flutter/services.dart';
  import 'package:flutter_svg/svg.dart';
  import 'package:toolbox/core/dialogs.dart';
  import 'package:toolbox/core/url.dart';
  import 'package:toolbox/gen/strings.g.dart';
  
  class CreditsPage extends StatefulWidget {
    const CreditsPage({ super.key });
    @override
    State<CreditsPage> createState() => _CreditsPage();
  }
  
  class _CreditsPage extends State<CreditsPage> {
    @override
    void initState() {
      super.initState();
    }
  
    @override
    void dispose() {
      super.dispose();
    }
  
    void showSwissDialog(BuildContext context) {
      showOkTextDialog(
        context,
        t.credits.made_with_love_in_switzerland,
        t.credits.made_with_love_in_switzerland_description
      );
    }
  
    @override
    Widget build(BuildContext context) {
      return Scaffold(
        appBar: AppBar(
          title: Text(t.credits.title),
        ),
        body: SafeArea(
          child: SingleChildScrollView(
            scrollDirection: Axis.vertical,
            child: Column(
              children: [
                SizedBox(
                  width: double.infinity,
                  child: Card(
                    child: Padding(
                      padding: const EdgeInsets.all(10),
                      child: Text(
                        t.credits.app_license(license: "Mozilla Public License 2.0"),
                        style: const TextStyle(fontSize: 20),
                        textAlign: TextAlign.center,
                      ),
                    ),
                  ),
                ),
                SizedBox(
                  width: double.infinity,
                  child: Card(
                    child: Padding(
                      padding: const EdgeInsets.all(10),
                      child: Text(
                        t.credits.app_icon(author: "Koizeay + Icons8"),
                        style: const TextStyle(fontSize: 20),
                        textAlign: TextAlign.center,
                      ),
                    ),
                  ),
                ),
                SizedBox(
                  width: double.infinity,
                  child: Card(
                    child: Padding(
                      padding: const EdgeInsets.all(10),
                      child: Column(
                        children: [
                          Text(
                            t.credits.tools_icons(author: "Icons8"),
                            style: const TextStyle(fontSize: 20),
                            textAlign: TextAlign.center,
                          ),
                          GestureDetector(
                            onTap: () {
                              launchUrlInBrowser("https://www.icons8.com/");
                            },
                            child: const Text(
                              "https://www.icons8.com/",
                              style: TextStyle(fontSize: 15),
                              textAlign: TextAlign.center,
                            ),
                          ),
                        ],
                      ),
                    ),
                  ),
                ),
                SizedBox(
                  width: double.infinity,
                  child: Card(
                    child: Padding(
                      padding: const EdgeInsets.all(10),
                      child: Column(
                        children: [
                          Text(
                            t.credits.translations.title,
                            style: const TextStyle(fontSize: 20),
                            textAlign: TextAlign.center,
                          ),
                          Text(
                            t.credits.translations.english(author: "Koizeay"),
                            style: const TextStyle(fontSize: 16),
                            textAlign: TextAlign.center,
                          ),
                          Text(
                            t.credits.translations.french(author: "Koizeay"),
                            style: const TextStyle(fontSize: 16),
                            textAlign: TextAlign.center,
                          ),
                        ],
                      ),
                    ),
                  ),
                ),
                SizedBox(
                  width: double.infinity,
                  child: Card(
                    child: Padding(
                      padding: const EdgeInsets.all(10),
                      child: Row(
                        mainAxisAlignment: MainAxisAlignment.center,
                        crossAxisAlignment: CrossAxisAlignment.center,
                        children: [
                          IconButton(
                            onPressed: () {
                              Clipboard.setData(const ClipboardData(text: "me@koizeay.com"));
                              ScaffoldMessenger.of(context).showSnackBar(
                                  SnackBar(content: Text(t.credits.email_copied_to_clipboard))
                              );
                            },
                            icon: SvgPicture.asset(
                              "assets/images/specific/credits_email.svg",
                              colorFilter: ColorFilter.mode(
                                  Theme.of(context).brightness == Brightness.dark
                                      ? Colors.white
                                      : Colors.black,
                                  BlendMode.srcIn
                              ),
                              width: 25,
                              height: 25,
                            )
                          ),
                          IconButton(
                            onPressed: () {
                              launchUrlInBrowser("https://instagram.com/koizeay.dev");
                            },
                            icon: SvgPicture.asset(
                              "assets/images/specific/credits_instagram.svg",
                              colorFilter: ColorFilter.mode(
                                  Theme.of(context).brightness == Brightness.dark
                                      ? Colors.white
                                      : Colors.black,
                                  BlendMode.srcIn
                              ),
                              width: 25,
                              height: 25,
                            )
                          ),
                          IconButton(
                            onPressed: () {
                              launchUrlInBrowser("https://bsky.app/profile/koizeay.dev");
                            },
                            icon: SvgPicture.asset(
                              "assets/images/specific/credits_bluesky.svg",
                              colorFilter: ColorFilter.mode(
                                  Theme.of(context).brightness == Brightness.dark
                                      ? Colors.white
                                      : Colors.black,
                                  BlendMode.srcIn
                              ),
                              width: 25,
                              height: 25,
                            )
                          ),
                          IconButton(
                            onPressed: () {
                              launchUrlInBrowser("https://jtu.me/discord");
                            },
                            icon: SvgPicture.asset(
                              "assets/images/specific/credits_discord.svg",
                              colorFilter: ColorFilter.mode(
                                  Theme.of(context).brightness == Brightness.dark
                                      ? Colors.white
                                      : Colors.black,
                                  BlendMode.srcIn
                              ),
                              width: 25,
                              height: 25,
                            )
                          ),
                        ],
                      )
                    ),
                  ),
                ),
                SizedBox(
                  width: double.infinity,
                  child: Card(
                    child: Padding(
                      padding: const EdgeInsets.all(10),
                      child: GestureDetector(
                        onTap: () {
                          launchUrlInBrowser("https://koizeay.com");
                        },
                        child: const Text(
                          "https://koizeay.com",
                          style: TextStyle(fontSize: 14, fontStyle: FontStyle.italic),
                          textAlign: TextAlign.center,
                        ),
                      ),
                    ),
                  ),
                ),
                if (Platform.isAndroid)
                SizedBox(
                  width: double.infinity,
                  child: Card(
                    child: Padding(
                      padding: const EdgeInsets.all(10),
                      child: Text(
                        t.credits.ads_disclaimer,
                        style: const TextStyle(fontSize: 12, fontStyle: FontStyle.italic),
                        textAlign: TextAlign.center,
                      ),
                    ),
                  ),
                ),
                GestureDetector(
                  onTap: () {
                    showLicensePage(
                      context: context,
                      applicationName: t.generic.app_name,
                      applicationLegalese: t.credits.app_license(license: "Mozilla Public License 2.0"),
                      applicationIcon: const Padding(
                        padding: EdgeInsets.all(4.0),
                        child: Image(image: AssetImage("assets/images/icons/icon_rounded.png"), width: 50, height: 50),
                      )
                    );
                  },
                  child: SizedBox(
                    width: double.infinity,
                    child: Card(
                      child: Padding(
                        padding: const EdgeInsets.all(10),
                        child: Text(
                          t.credits.view_licenses,
                          style: TextStyle(fontSize: 14, color: Theme.of(context).colorScheme.primary, fontWeight: FontWeight.bold),
                          textAlign: TextAlign.center,
                        ),
                      ),
                    ),
                  ),
                ),
                GestureDetector(
                  onTap: () {
                    launchUrlInBrowser("https://github.com/Koizeay/Toolbox");
                  },
                  child: SizedBox(
                    width: double.infinity,
                    child: Card(
                      child: Padding(
                        padding: const EdgeInsets.all(10),
                        child: Text(
                          t.credits.contribute_on_github,
                          style: TextStyle(fontSize: 20, color: Theme.of(context).colorScheme.primary, fontWeight: FontWeight.bold),
                          textAlign: TextAlign.center,
                        ),
                      ),
                    ),
                  ),
                ),
                GestureDetector(
                  onTap: () {
                    showSwissDialog(context);
                  },
                  child: SizedBox(
                    width: double.infinity,
                    child: Card(
                      child: Padding(
                        padding: const EdgeInsets.all(10),
                        child: Column(
                          children: [
                            Text(
                              t.credits.made_with_love_in_switzerland,
                              style: const TextStyle(fontSize: 14, fontWeight: FontWeight.bold),
                              textAlign: TextAlign.center,
                            ),
                            const SizedBox(height: 8,),
                            ClipRRect(
                              borderRadius: BorderRadius.circular(5),
                              child: Image.asset(
                                "assets/images/specific/credits_swiss_flag.png",
                                width: 25,
                                height: 25,
                              ),
                            ),
                          ],
                        ),
                      ),
                    ),
                  ),
                ),
                GestureDetector(
                  onTap: () {
                    launchUrlInBrowser("https://jtu.me/projects");
                  },
                  child: SizedBox(
                    width: double.infinity,
                    child: Card(
                      color: Theme.of(context).colorScheme.primary,
                      child: Padding(
                        padding: const EdgeInsets.all(10),
                        child: Text(
                          t.credits.more_apps_and_services,
                          style: const TextStyle(fontSize: 18, color: Colors.white, fontWeight: FontWeight.bold),
                          textAlign: TextAlign.center,
                        ),
                      ),
                    ),
                  ),
                ),
              ],
            ),
          ),
        ),
      );
    }
  }