This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import 'package:integration_test/integration_test_driver.dart'; | |
Future<void> main() => integrationDriver(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import 'package:flutter_test/flutter_test.dart'; | |
import 'package:flutter/material.dart'; | |
import 'package:untitled/main.dart'; | |
void main() { | |
testWidgets('App loads and shows counter UI', (WidgetTester tester) async { | |
// Run the full app (includes main(), MyApp, Home) | |
await tester.pumpWidget(const MyApp()); | |
// Ensure title is present |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import 'package:bloc_test/bloc_test.dart'; | |
import 'package:flutter_test/flutter_test.dart'; | |
import 'package:untitled/counter_bloc/counter_bloc.dart'; | |
void main() { | |
group('CounterBloc', () { | |
late CounterBloc counterBloc; | |
setUp(() { | |
counterBloc = CounterBloc(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import 'package:flutter/material.dart'; | |
import 'package:flutter_bloc/flutter_bloc.dart'; | |
import 'package:untitled/counter_bloc/counter_bloc.dart'; // This should contain the CounterBloc and CounterEvent | |
void main() { | |
runApp(const MyApp()); | |
} | |
class MyApp extends StatelessWidget { | |
const MyApp({super.key}); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import 'package:flutter_bloc/flutter_bloc.dart'; | |
// Define the events | |
abstract class CounterEvent {} | |
class CounterIncrement extends CounterEvent {} | |
class CounterDecrement extends CounterEvent {} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class StrictRangeFilteringTextInputFormatter extends FilteringTextInputFormatter { | |
final double min; | |
final double max; | |
final bool allowNegative; | |
final bool unlimitedDecimals; | |
final int? decimalPlaces; | |
StrictRangeFilteringTextInputFormatter({ | |
required this.min, | |
required this.max, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import 'package:flutter/foundation.dart'; | |
import 'package:flutter/material.dart'; | |
class CustomDialogLayout extends SingleChildLayoutDelegate { | |
CustomDialogLayout({ | |
required this.anchorRect, | |
required this.textDirection, | |
required this.alignment, | |
required this.alignmentOffset, | |
required this.menuPadding, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import 'dart:async'; | |
import 'package:flutter/material.dart'; | |
void main() { | |
runApp(const MyApp()); | |
} | |
class MyApp extends StatefulWidget { | |
const MyApp({super.key}); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import 'dart:io'; | |
import 'package:flutter/material.dart'; | |
import 'package:path_provider/path_provider.dart'; | |
void main() { | |
runApp(const MyApp()); | |
} | |
class MyApp extends StatelessWidget { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//dialogs | |
//date time(datetime picker) | |
//file storage | |
//Drectory | |
import 'dart:io'; | |
import 'package:flutter/material.dart'; | |
import 'package:path_provider/path_provider.dart'; | |
void main() async { |