This file contains 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:app/src/common_widgets/app_bar_text_title.dart'; | |
import 'package:app/src/constant/app_colors.dart'; | |
import 'package:app/src/utils/size_config.dart'; | |
import 'package:flutter/material.dart'; | |
import 'package:flutter_svg/flutter_svg.dart'; | |
import '../../common_widgets/wallet_cards.dart'; | |
import '../../constant/app_assets.dart'; | |
class TransactionHistoryScreen extends StatefulWidget { |
This file contains 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:developer'; | |
import 'package:flutter/material.dart'; | |
import 'package:widget_sample/model/blog.dart'; | |
class ListItem extends StatefulWidget { | |
const ListItem({ | |
super.key, | |
required this.blogs, | |
required this.index, |
This file contains 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 SampleWidget extends StatelessWidget { | |
const SampleWidget({super.key}); | |
@override | |
Widget build(BuildContext context) { | |
return const SomeWidget(); | |
} | |
//helper method | |
Widget SomeWidget(){ |
This file contains 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:developer'; | |
import 'package:flutter/material.dart'; | |
import '../data/blog_list.dart'; | |
class ListScreen extends StatefulWidget { | |
const ListScreen({super.key}); | |
@override |
This file contains 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
//There are different ways to create listview, we will be using ListView.builder in this sample | |
ListView.builder( | |
itemCount: list.length//lengthOfListItem, | |
itemBuilder: (context, index) { | |
return ListItemWidget; //List item widget; | |
}, | |
) |
This file contains 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
name: Flutter | |
on: #events (push and pull_request) | |
push: | |
branches: [ "main" ] | |
pull_request: | |
branches: [ "main" ] | |
jobs: #here we specify the jobs - We could have multiple jobs |
This file contains 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
name: Flutter | |
on: #events (push and pull_request) | |
push: | |
branches: [ "main" ] | |
pull_request: | |
branches: [ "main" ] | |
jobs: #here we specify the jobs - We could have multiple jobs |
This file contains 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
void main() async { | |
WidgetsBinding widgetsBinding = WidgetsFlutterBinding.ensureInitialized(); | |
NotificationApi.init(); | |
runApp(const DruveApp()); | |
} |
This file contains 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
//add the method to NotificationApi class | |
static pushNotification( | |
RemoteMessage message, | |
) async { | |
var androidPlatformChannelSpecifics = const AndroidNotificationDetails( | |
'channed id', | |
'channel name', | |
channelDescription: 'channel description', | |
importance: Importance.max, |
This file contains 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 all packages used | |
void main() async { | |
WidgetsBinding widgetsBinding = WidgetsFlutterBinding.ensureInitialized(); | |
NotificationApi.init(); | |
//initial firebase | |
await Firebase.initializeApp( | |
options: DefaultFirebaseOptions.currentPlatform, | |
); |
NewerOlder