Skip to content

Commit

Permalink
Improve check highlight with blur, fix for impeller
Browse files Browse the repository at this point in the history
  • Loading branch information
veloce committed Aug 7, 2023
1 parent 84b9b3e commit 861a928
Showing 1 changed file with 18 additions and 17 deletions.
35 changes: 18 additions & 17 deletions lib/src/widgets/highlight.dart
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import 'dart:ui';
import 'package:flutter/material.dart';
import 'package:flutter/widgets.dart';
import '../models.dart';
Expand All @@ -14,7 +15,6 @@ class Highlight extends StatelessWidget {

@override
Widget build(BuildContext context) {

if (details.image != null) {
return Container(
width: size,
Expand Down Expand Up @@ -45,22 +45,23 @@ class CheckHighlight extends StatelessWidget {
Widget build(BuildContext context) {
return SizedBox.square(
dimension: size,
child: Container(
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(size),
border: Border.all(
color: const Color(0x40FF0000),
width: size,
),
gradient: const RadialGradient(
radius: 0.6,
colors: [
Color(0xFFFF0000),
Color(0xFFE70000),
Color(0x00A90000),
Color(0x009E0000),
],
stops: [0.0, 0.25, 0.90, 1.0],
child: ClipRect(
child: ImageFiltered(
imageFilter: ImageFilter.blur(sigmaX: 10.0, sigmaY: 10.0),
child: Container(
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(size),
gradient: const RadialGradient(
radius: 0.6,
colors: [
Color(0xFFFF0000),
Color(0xFFE70000),
Color(0x00A90000),
Color(0x009E0000),
],
stops: [0.0, 0.25, 0.90, 1.0],
),
),
),
),
),
Expand Down

0 comments on commit 861a928

Please sign in to comment.