You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
52 lines
1.4 KiB
52 lines
1.4 KiB
import 'dart:typed_data';
|
|
|
|
import 'package:flutter/material.dart';
|
|
import 'package:teso/Classes/ColorFilters.dart';
|
|
import 'package:teso/util/SizeConfig.dart';
|
|
|
|
buildFilterThumb(BuildContext context, ColorFilter color, Uint8List thumb) {
|
|
SizeConfig().init(context);
|
|
return Container(
|
|
margin: EdgeInsets.symmetric(
|
|
horizontal: 5,
|
|
),
|
|
width: SizeConfig.safeBlockHorizontal * 25,
|
|
height: 45,
|
|
color: Colors.white,
|
|
child: Column(
|
|
children: [
|
|
Container(
|
|
width: SizeConfig.safeBlockHorizontal * 25,
|
|
color: Color.fromRGBO(0, 0, 0, 0.8),
|
|
child: Text(
|
|
color.name!,
|
|
textAlign: TextAlign.center,
|
|
style: TextStyle(
|
|
fontSize: 15,
|
|
color: Colors.white,
|
|
),
|
|
),
|
|
),
|
|
Container(
|
|
width: SizeConfig.safeBlockHorizontal * 25,
|
|
child: Stack(
|
|
children: [
|
|
Image.memory(
|
|
thumb,
|
|
height: 93.5,
|
|
fit: BoxFit.fill,
|
|
),
|
|
Container(
|
|
width: SizeConfig.safeBlockHorizontal * 25,
|
|
height: 93,
|
|
color: color.name!.toLowerCase() == "original"
|
|
? color.code!.withOpacity(0)
|
|
: color.code!.withOpacity(0.5),
|
|
),
|
|
],
|
|
),
|
|
),
|
|
],
|
|
),
|
|
);
|
|
}
|
|
|