Skip to content
Snippets Groups Projects
Select Git revision
  • 8f23c0a3548d0799185527a6965bc4c8b98c98b9
  • master default protected
  • 21-add-onlongpress-with-popup-on-parameters
  • 23-center-vertically-buttons
  • 30-highlight-bin-when-selecting-disabled-item
  • 1.0.7 protected
  • 1.0.6 protected
  • 1.0.5 protected
  • 1.0.4 protected
  • 1.0.3 protected
  • 1.0.2 protected
  • 1.0.0 protected
  • 0.9.1 protected
  • 0.9.0 protected
  • 0.8.4 protected
  • 0.8.3 protected
  • 0.8.2 protected
  • 0.8.1 protected
  • 0.8.0 protected
  • 0.7.0 protected
  • 0.6.1 protected
  • 0.6.0 protected
  • 0.5.0 protected
  • 0.4.0 protected
  • 0.3.0 protected
25 results

button_quit_activity.dart

Blame
  • outlined_text_widget.dart 1.20 KiB
    import 'package:flutter/material.dart';
    
    import 'package:flutter_custom_toolbox/utils/color_extensions.dart';
    
    class OutlinedText extends StatelessWidget {
      const OutlinedText({
        super.key,
        required this.text,
        required this.fontSize,
        required this.textColor,
        this.outlineColor,
      });
    
      final String text;
      final double fontSize;
      final Color textColor;
      final Color? outlineColor;
    
      @override
      Widget build(BuildContext context) {
        final double delta = fontSize / 30;
    
        return Text(
          text,
          style: TextStyle(
            inherit: true,
            fontSize: fontSize,
            fontWeight: FontWeight.w600,
            color: textColor,
            shadows: [
              Shadow(
                offset: Offset(-delta, -delta),
                color: outlineColor ?? textColor.darken(),
              ),
              Shadow(
                offset: Offset(delta, -delta),
                color: outlineColor ?? textColor.darken(),
              ),
              Shadow(
                offset: Offset(delta, delta),
                color: outlineColor ?? textColor.darken(),
              ),
              Shadow(
                offset: Offset(-delta, delta),
                color: outlineColor ?? textColor.darken(),
              ),
            ],
          ),
        );
      }
    }