mirrored_repositories/awesome-flutter/examples/plugins/packages/ios_platform_images/example
// Copyright 2013 The Flutter Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

import 'dart:io';

import 'package:flutter/material.dart';
import 'package:flutter_test/flutter_test.dart';

import 'package:ios_platform_images_example/main.dart';

void main() {
  testWidgets('Verify loads image', (WidgetTester tester) async {
    // Build our app and trigger a frame.
    await tester.pumpWidget(MyApp());

    // Verify that platform version is retrieved.
    expect(
      find.byWidgetPredicate(
        (Widget widget) =>
            widget is Image && (Platform.isIOS ? widget.image != null : true),
      ),
      findsOneWidget,
    );
  });
}
