This commit is contained in:
1 parent
dabff48f7c
commit
a7b4277536
2 files changed
+15
-6
No files matched your search
@@ -7,6 +7,7 @@ import 'package:flutter/material.dart';
|
||||
import 'package:flutter/rendering.dart';
|
||||
import 'package:flutter_test/flutter_test.dart';
|
||||
import 'package:fruitshorts/core/data/models/drama.dart';
|
||||
import 'package:fruitshorts/core/theme/app_colors.dart';
|
||||
import 'package:fruitshorts/l10n/app_localizations.dart';
|
||||
import 'package:fruitshorts/pages/player/widgets/home_feed_recommend_panel.dart';
|
||||
|
||||
@@ -15,7 +16,6 @@ const _width = 280.0;
|
||||
const _sampleInset = 16;
|
||||
const _sampleY = 4;
|
||||
const _rgbaChannels = 4;
|
||||
const _surfaceChannel = 0.2;
|
||||
const _surfaceTolerance = 0.01;
|
||||
const _drama = Drama(
|
||||
id: 'surface',
|
||||
@@ -71,9 +71,18 @@ void main() {
|
||||
image.dispose();
|
||||
for (final sample in [left, middle, right]) {
|
||||
expect(sample.a, 1);
|
||||
expect(sample.r, closeTo(_surfaceChannel, _surfaceTolerance));
|
||||
expect(sample.g, closeTo(_surfaceChannel, _surfaceTolerance));
|
||||
expect(sample.b, closeTo(_surfaceChannel, _surfaceTolerance));
|
||||
expect(
|
||||
sample.r,
|
||||
closeTo(AppColors.watchAllSurface.r, _surfaceTolerance),
|
||||
);
|
||||
expect(
|
||||
sample.g,
|
||||
closeTo(AppColors.watchAllSurface.g, _surfaceTolerance),
|
||||
);
|
||||
expect(
|
||||
sample.b,
|
||||
closeTo(AppColors.watchAllSurface.b, _surfaceTolerance),
|
||||
);
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
Reference in new issue
Block a user