Flutter Engine
GoldenImage.h
Go to the documentation of this file.
1 // Copyright 2013 The Flutter Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4 
5 #import <UIKit/UIKit.h>
6 
8 
9 @interface GoldenImage : NSObject
10 
11 @property(readonly, copy, nonatomic) NSString* goldenName;
12 @property(readonly, strong, nonatomic) UIImage* image;
13 
14 // Initilize with the golden file's prefix.
15 //
16 // Create an image from a golden file named prefix+devicemodel.
17 - (instancetype)initWithGoldenNamePrefix:(NSString*)prefix;
18 
19 // Compare this GoldenImage to `image`.
20 //
21 // Return YES if the `image` of this GoldenImage have the same pixels of provided `image`.
22 - (BOOL)compareGoldenToImage:(UIImage*)image;
23 
24 @end
25 
#define NS_ASSUME_NONNULL_END
Definition: FlutterMacros.h:20
#define NS_ASSUME_NONNULL_BEGIN
Definition: FlutterMacros.h:19
NSString * goldenName
Definition: GoldenImage.h:11
UIImage * image
Definition: GoldenImage.h:12