Skip to content

Releases: khlebobul/use_scramble

v 0.0.10

19 May 19:29

Choose a tag to compare

  • Refactored the TextScramble widget:
    • Removed the style and textAlign properties.
    • Added a required builder: (BuildContext, String) => Widget property. This allows users to define their own rendering logic for the displayed text, providing greater flexibility in customizing its appearance. Text styling and alignment should now be implemented within the builder function.
TextScramble(
    text: 'Hello World!',
    speed: Duration(milliseconds: 50),
    chars: '!<>-_\\/[]{}—=+*^?#________',
    correctCharProbability: 0.1, // Correct character probability in [0, 1]
    scrambleCycles: 4, // Number of times to scramble the text
    builder: (context, scrambledText) {
      // Use the builder to define how the text is displayed
      return Text(
        scrambledText,
        textAlign: TextAlign.center, // Text alignment is now within the builder
        style: TextStyle( // Text style is now within the builder
          fontSize: 40,
          color: Colors.green,
          fontFamily: 'JetBrainsMono',
        ),
      );
    },
),

This change enhances the widget's flexibility by decoupling the scrambling logic from the text rendering, enabling users to use any widget to display the scrambled text.

Thanks eibaan for the recommendations

v 0.0.8

04 Mar 20:17

Choose a tag to compare

  • Update example
  • Update documentation

v 0.0.7

04 Mar 20:04

Choose a tag to compare

  • Add textAlign parameter
TextScramble(
    text: 'Hello World!',
    speed: Duration(milliseconds: 50),
    chars: '!<>-_\\/[]{}—=+*^?#________',
    correctCharProbability: 0.1, // Correct character probability in [0, 1]
    scrambleCycles: 4, // Number of times to scramble the text
    textAlign: TextAlign.center, // Optional text alignment
    style: TextStyle(
            fontSize: 40,
            color: Colors.green,
            fontFamily: 'JetBrainsMono',
    ),
),

v 0.0.5

24 Dec 05:54

Choose a tag to compare

0.0.5

  • Update example

0.0.4

  • Add correctCharProbability and scrambleCycles parameters

v 0.0.3

23 Dec 11:36

Choose a tag to compare

0.0.3

0.0.2

  • Update example
  • Add codacy badge

0.0.1

  • Initial release