Skip to content
Snippets Groups Projects
Select Git revision
  • 3aa8848ac047763ae6fc575ec64beadeefda2d17
  • main default protected
  • release/1.1
  • encrypt_comments
  • mnemonic_dewif
  • authors_rules
  • 0.14
  • rtd
  • 1.2.1 protected
  • 1.2.0 protected
  • 1.1.1 protected
  • 1.1.0 protected
  • 1.0.0 protected
  • 1.0.0rc1 protected
  • 1.0.0rc0 protected
  • 1.0.0-rc protected
  • 0.62.0 protected
  • 0.61.0 protected
  • 0.60.1 protected
  • 0.58.1 protected
  • 0.60.0 protected
  • 0.58.0 protected
  • 0.57.0 protected
  • 0.56.0 protected
  • 0.55.1 protected
  • 0.55.0 protected
  • 0.54.3 protected
  • 0.54.2 protected
28 results

load_encrypted_ascii_armor_message.py

Blame
  • common_elements.dart 9.54 KiB
    import 'package:dots_indicator/dots_indicator.dart';
    import 'package:easy_localization/easy_localization.dart';
    import 'package:flutter/material.dart';
    import 'package:flutter_markdown/flutter_markdown.dart';
    import 'package:gecko/globals.dart';
    import 'package:gecko/models/widgets_keys.dart';
    import 'package:gecko/providers/substrate_sdk.dart';
    import 'package:provider/provider.dart';
    
    class CommonElements {
      // Exemple de Widget
      Widget exemple(String data) {
        return const Text('Coucou');
      }
    
      Widget buildImage(String assetName,
          [double boxHeight = 440, double imageWidth = 350]) {
        return Container(
            padding: const EdgeInsets.all(0),
            width: 440,
            height: isTall ? boxHeight : boxHeight * 0.9,
            decoration: BoxDecoration(
                gradient: const LinearGradient(
                  begin: Alignment.topLeft,
                  end: Alignment.bottomRight,
                  colors: [
                    Color(0xffd2d4cf),
                    Color(0xffeaeae7),
                  ],
                ),
                border: Border.all(color: Colors.grey[900]!)),
            child: Image.asset('assets/onBoarding/$assetName', width: imageWidth));
      }
    
      Widget buildText(String text, [double size = 20, bool isMd = false]) {
        final mdStyle = MarkdownStyleSheet(
          p: TextStyle(
              fontSize: isTall ? size : size * 0.9,
              color: Colors.black,
              letterSpacing: 0.3),
          textAlign: WrapAlignment.spaceBetween,
        );
    
        return Container(
          padding: const EdgeInsets.all(12),
          width: 440,
          decoration: BoxDecoration(
              color: Colors.white, border: Border.all(color: Colors.grey[900]!)),
          child: isMd
              ? MarkdownBody(data: text, styleSheet: mdStyle)
              : Text(text,
                  textAlign: TextAlign.justify,
                  style: TextStyle(
                      fontSize: isTall ? size : size * 0.9,
                      color: Colors.black,
                      letterSpacing: 0.3)),
        );
      }
    
      Widget nextButton(
          BuildContext context, String text, nextScreen, bool isFast) {
        return SizedBox(
          width: 380 * ratio,
          height: 60 * ratio,
          child: ElevatedButton(
            key: keyGoNext,
            style: ElevatedButton.styleFrom(
              foregroundColor: Colors.white, backgroundColor: orangeC,
              elevation: 4, // foreground
            ),