Skip to content

Conversation

@slavap
Copy link
Contributor

@slavap slavap commented Jan 31, 2020

Example:

dlg = YYDialog().build(context)
      ..gravity = Gravity.top
      ..width = double.infinity
      ..height = 350
      ..backgroundColor = Colors.teal
      ..decoration = BoxDecoration(
        gradient: LinearGradient(
          // Where the linear gradient begins and ends
          begin: Alignment.topRight,
          end: Alignment.bottomLeft,
          // Add one stop for each color. Stops should increase from 0 to 1
          stops: [0.1, 0.3, 0.5, 0.7, 0.9],
          colors: [
            Colors.teal[800],
            Colors.teal[700],
            Colors.teal[600],
            Colors.teal[500],
            Colors.teal[400],
          ],
        ),
      )
      ..barrierDismissible = false
      ..borderRadius = 0.0

produces the following result:
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants