Add an example showing how to use textures (#122779)

There didn't seem to be any examples on how to do this.

I've only shown the Linux implementation, others may want to follow this
PR up with support for other platforms.
This commit is contained in:
Robert Ancell
2023-07-03 13:54:18 +12:00
committed by GitHub
parent 63a8298d4b
commit 9760bb0cf0
11 changed files with 724 additions and 0 deletions

View File

@@ -0,0 +1,16 @@
// Copyright 2014 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 'package:flutter_test/flutter_test.dart';
import 'package:texture/main.dart' as texture;
void main() {
testWidgets('Texture smoke test', (WidgetTester tester) async {
texture
.main(); // builds the app and schedules a frame but doesn't trigger one
await tester.pump(); // triggers a frame
expect(find.text('Fluter Blue'), findsOneWidget);
});
}