Skip to content
Snippets Groups Projects
Select Git revision
  • b64767bc33756f140307d284f6b6d6e6229da1d6
  • master default protected
  • 46-upgrade-framework-and-dependencies
  • 29-add-difficulty-level-parameter
  • 23-improve-app-metadata
  • 3-fix-layout-on-orientation-change
  • Release_1.9.0_41 protected
  • Release_1.8.2_40 protected
  • Release_1.8.1_39 protected
  • Release_1.8.0_38 protected
  • Release_1.7.0_37 protected
  • Release_1.6.0_36 protected
  • Release_1.5.0_35 protected
  • Release_1.4.2_34 protected
  • Release_1.4.1_33 protected
  • Release_1.4.0_32 protected
  • Release_1.3.0_31 protected
  • Release_1.2.1_30 protected
  • Release_1.2.0_29 protected
  • Release_1.1.1_28 protected
  • Release_1.1.0_27 protected
  • Release_1.0.25_26 protected
  • Release_1.0.24_25 protected
  • Release_1.0.23_24 protected
  • Release_1.0.22_23 protected
  • Release_1.0.21_22 protected
26 results

button_game_start_new.dart

Blame
  • widget_test.dart 1.02 KiB
    // This is a basic Flutter widget test.
    //
    // To perform an interaction with a widget in your test, use the WidgetTester
    // utility that Flutter provides. For example, you can send tap and scroll
    // gestures. You can also use WidgetTester to find child widgets in the widget
    // tree, read text, and verify that the values of widget properties are correct.
    
    import 'package:flutter/material.dart';
    import 'package:flutter_test/flutter_test.dart';
    
    import 'package:random/main.dart';
    
    void main() {
      testWidgets('Counter increments smoke test', (WidgetTester tester) async {
        // Build our app and trigger a frame.
        await tester.pumpWidget(MyApp());
    
        // Verify that our counter starts at 0.
        expect(find.text('0'), findsOneWidget);
        expect(find.text('1'), findsNothing);
    
        // Tap the '+' icon and trigger a frame.
        await tester.tap(find.byIcon(Icons.add));
        await tester.pump();
    
        // Verify that our counter has incremented.
        expect(find.text('0'), findsNothing);
        expect(find.text('1'), findsOneWidget);
      });
    }