Ejemplo n.º 1
0
 public override Widget build(BuildContext context)
 {
     return(new AnimatedPadding(
                padding: MediaQuery.of(context).viewInsets + EdgeInsets.symmetric(horizontal: 40.0f, vertical: 24.0f),
                duration: this.insetAnimationDuration,
                curve: this.insetAnimationCurve,
                child: MediaQuery.removeViewInsets(
                    removeLeft: true,
                    removeTop: true,
                    removeRight: true,
                    removeBottom: true,
                    context: context,
                    child: new Center(
                        child: new ConstrainedBox(
                            constraints: new BoxConstraints(280.0f),
                            child: new Container(
                                decoration: new BoxDecoration(
                                    color: this.backgroundColor,
                                    borderRadius: BorderRadius.all((float)this.radius)
                                    ),
                                child: this.child
                                )
                            )
                        )
                    )
                ));
 }
Ejemplo n.º 2
0
        public override Widget build(BuildContext context)
        {
            DialogTheme dialogTheme = DialogTheme.of(context);

            return(new AnimatedPadding(
                       padding: MediaQuery.of(context).viewInsets + EdgeInsets.symmetric(horizontal: 40.0f, vertical: 24.0f),
                       duration: this.insetAnimationDuration,
                       curve: this.insetAnimationCurve,
                       child: MediaQuery.removeViewInsets(
                           removeLeft: true,
                           removeTop: true,
                           removeRight: true,
                           removeBottom: true,
                           context: context,
                           child: new Center(
                               child: new ConstrainedBox(
                                   constraints: new BoxConstraints(minWidth: 280.0f),
                                   child: new Material(
                                       color: this.backgroundColor ?? dialogTheme.backgroundColor ??
                                       Theme.of(context).dialogBackgroundColor,
                                       elevation: this.elevation ?? dialogTheme.elevation ?? _defaultElevation,
                                       shape: this.shape ?? dialogTheme.shape ?? _defaultDialogShape,
                                       type: MaterialType.card,
                                       child: this.child
                                       )
                                   )
                               )
                           )
                       ));
        }
Ejemplo n.º 3
0
        public override Widget build(BuildContext context)
        {
            DialogTheme dialogTheme      = DialogTheme.of(context);
            EdgeInsets  effectivePadding = MediaQuery.of(context).viewInsets + (insetPadding ?? EdgeInsets.all(0.0f));

            return(new AnimatedPadding(
                       padding: effectivePadding,
                       duration: insetAnimationDuration,
                       curve: insetAnimationCurve,
                       child: MediaQuery.removeViewInsets(
                           removeLeft: true,
                           removeTop: true,
                           removeRight: true,
                           removeBottom: true,
                           context: context,
                           child: new Center(
                               child: new ConstrainedBox(
                                   constraints: new BoxConstraints(minWidth: 280.0f),
                                   child: new Material(
                                       color: backgroundColor ?? dialogTheme.backgroundColor ??
                                       Theme.of(context).dialogBackgroundColor,
                                       elevation: elevation ?? dialogTheme.elevation ?? _defaultElevation,
                                       shape: shape ?? dialogTheme.shape ?? _defaultDialogShape,
                                       type: MaterialType.card,
                                       clipBehavior: clipBehavior,
                                       child: child
                                       )
                                   )
                               )
                           )
                       ));
        }
Ejemplo n.º 4
0
 public override Widget build(BuildContext context)
 {
     return(new AnimatedPadding(
                padding: MediaQuery.of(context).viewInsets + EdgeInsets.symmetric(horizontal: 40.0f, vertical: 24.0f),
                duration: this.insetAnimationDuration,
                curve: this.insetAnimationCurve,
                child: MediaQuery.removeViewInsets(
                    removeLeft: true,
                    removeTop: true,
                    removeRight: true,
                    removeBottom: true,
                    context: context,
                    child: new Center(
                        child: new ConstrainedBox(
                            constraints: new BoxConstraints(280.0f),
                            child: new Column(
                                mainAxisAlignment: MainAxisAlignment.center,
                                children: new List <Widget> {
         this.header ?? new Container(),
         new Container(
             decoration: new BoxDecoration(
                 color: this.backgroundColor,
                 borderRadius: this.header == null
                                         ? BorderRadius.all(Radius.circular((float)this.radius))
                                         : BorderRadius.only(
                     bottomRight: Radius.circular((float)this.radius),
                     bottomLeft: Radius.circular((float)this.radius)
                     )
                 ),
             child: this.child
             )
     }
                                )
                            )
                        )
                    )
                ));
 }