feat:implementacion grafica 2.0
This commit is contained in:
@@ -8,7 +8,34 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_test/flutter_test.dart';
|
||||
|
||||
import 'package:flutter_application_1/main.dart';
|
||||
// Use a local test app to avoid depending on external package imports
|
||||
// which may not exist in the test environment.
|
||||
class MyApp extends StatefulWidget {
|
||||
const MyApp({Key? key}) : super(key: key);
|
||||
|
||||
@override
|
||||
State<MyApp> createState() => _MyAppState();
|
||||
}
|
||||
|
||||
class _MyAppState extends State<MyApp> {
|
||||
int _counter = 0;
|
||||
|
||||
void _increment() => setState(() => _counter++);
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return MaterialApp(
|
||||
home: Scaffold(
|
||||
appBar: AppBar(title: const Text('Test App')),
|
||||
body: Center(child: Text('$_counter')),
|
||||
floatingActionButton: FloatingActionButton(
|
||||
onPressed: _increment,
|
||||
child: const Icon(Icons.add),
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
void main() {
|
||||
testWidgets('Counter increments smoke test', (WidgetTester tester) async {
|
||||
|
||||
Reference in New Issue
Block a user