repo_id stringlengths 21 168 | file_path stringlengths 36 210 | content stringlengths 1 9.98M | __index_level_0__ int64 0 0 |
|---|---|---|---|
mirrored_repositories/openreads/lib/ui/book_screen | mirrored_repositories/openreads/lib/ui/book_screen/widgets/book_title_detail.dart | import 'package:diacritic/diacritic.dart';
import 'package:easy_localization/easy_localization.dart';
import 'package:flutter/material.dart';
import 'package:font_awesome_flutter/font_awesome_flutter.dart';
import 'package:openreads/core/constants/enums/enums.dart';
import 'package:openreads/core/themes/app_theme.dart'... | 0 |
mirrored_repositories/openreads/lib/ui/book_screen | mirrored_repositories/openreads/lib/ui/book_screen/widgets/book_detail.dart | import 'package:flutter/material.dart';
import 'package:openreads/core/themes/app_theme.dart';
class BookDetail extends StatelessWidget {
const BookDetail({
super.key,
required this.title,
required this.text,
});
final String title;
final String text;
@override
Widget build(BuildContext cont... | 0 |
mirrored_repositories/openreads/lib/ui | mirrored_repositories/openreads/lib/ui/unfinished_screen/unfinished_screen.dart | import 'package:easy_localization/easy_localization.dart';
import 'package:flutter/material.dart';
import 'package:openreads/generated/locale_keys.g.dart';
import 'package:openreads/main.dart';
import 'package:openreads/model/book.dart';
import 'package:openreads/ui/books_screen/widgets/widgets.dart';
class Unfinished... | 0 |
mirrored_repositories/flutter_light_dark_theme | mirrored_repositories/flutter_light_dark_theme/lib/main.dart | import 'package:dynamic_themes/dynamic_themes.dart';
import 'package:flutter/material.dart';
import 'package:flutter_light_dark_theme/helpers/themes.dart';
void main() {
runApp(const MyApp());
}
class MyApp extends StatelessWidget {
const MyApp({Key? key}) : super(key: key);
// This widget is the root of your ... | 0 |
mirrored_repositories/flutter_light_dark_theme/lib | mirrored_repositories/flutter_light_dark_theme/lib/helpers/themes.dart | // ignore_for_file: constant_identifier_names, prefer_const_constructors
import 'package:dynamic_themes/dynamic_themes.dart';
import 'package:flutter/material.dart';
import 'package:flutter_light_dark_theme/helpers/app_config.dart' as config;
class AppThemes {
static const int Light = 0;
static const int Dark = 1... | 0 |
mirrored_repositories/flutter_light_dark_theme/lib | mirrored_repositories/flutter_light_dark_theme/lib/helpers/app_config.dart | import 'package:flutter/material.dart';
class Colors {
Color primaryColor = const Color(0xFFFE9205);
Color brownColor = const Color(0xff47381E);
Color blackColor = const Color(0xff242324);
Color whiteColor = const Color(0xffffffff);
}
| 0 |
mirrored_repositories/flutter_light_dark_theme | mirrored_repositories/flutter_light_dark_theme/test/widget_test.dart | // This is a basic Flutter widget test.
//
// To perform an interaction with a widget in your test, use the WidgetTester
// utility in the flutter_test package. 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... | 0 |
mirrored_repositories/Pagination-in-Flutter | mirrored_repositories/Pagination-in-Flutter/lib/main.dart | /*
Aim : Paginating the data while
loading from a database or from an API
Pros : Reduces the Database maintainence
and pricing of the database
Imagine you are having an app which is having
about 100K+ downloads and 10K+ daily users everyday
and users perform read operations in order to
load data. when an app having ... | 0 |
mirrored_repositories/simbasa | mirrored_repositories/simbasa/lib/main.dart | import 'package:flutter/material.dart';
import 'package:provider/provider.dart';
import 'package:simbasa/provider/HomaPageProvider.dart';
import 'package:simbasa/provider/SetoranProvider.dart';
import 'package:simbasa/view/SplashScreenPage/SplashscreenPage.dart';
void main() {
runApp(MyApp());
}
class MyApp extends... | 0 |
mirrored_repositories/simbasa/lib/view | mirrored_repositories/simbasa/lib/view/DasboardPage/DashboardPage.dart | import 'package:flutter/material.dart';
import 'package:flutter/rendering.dart';
import 'package:provider/provider.dart';
import 'package:simbasa/model/HomePageModel.dart';
import 'package:simbasa/provider/HomaPageProvider.dart';
import 'package:simbasa/theme/PaletteColor.dart';
import 'package:simbasa/theme/Typography... | 0 |
mirrored_repositories/simbasa/lib/view/DasboardPage | mirrored_repositories/simbasa/lib/view/DasboardPage/component/component.dart | import 'package:flutter/material.dart';
import 'package:simbasa/theme/PaletteColor.dart';
import 'package:simbasa/theme/TypographyStyle.dart';
InkWell card({String title, Icon icon, Function onPressed}) {
return InkWell(
onTap: onPressed,
child: Card(
shape: RoundedRectangleBorder(
borderRadius... | 0 |
mirrored_repositories/simbasa/lib/view/DasboardPage/component | mirrored_repositories/simbasa/lib/view/DasboardPage/component/chart/linecart.dart | import 'package:fl_chart/fl_chart.dart';
import 'package:flutter/material.dart';
import 'package:simbasa/theme/PaletteColor.dart';
class LineChartSample2 extends StatefulWidget {
@override
_LineChartSample2State createState() => _LineChartSample2State();
}
class _LineChartSample2State extends State<LineChartSa... | 0 |
mirrored_repositories/simbasa/lib/view/DasboardPage | mirrored_repositories/simbasa/lib/view/DasboardPage/TransactionsPage/PenjualanPage.dart | import 'package:flutter/material.dart';
import 'package:simbasa/theme/PaletteColor.dart';
import 'package:simbasa/theme/TypographyStyle.dart';
import 'package:simbasa/view/component/appbar/appbar.dart';
import 'package:flutter/cupertino.dart';
class PenjualanPage extends StatefulWidget {
@override
_PenjualanPageSta... | 0 |
mirrored_repositories/simbasa/lib/view/DasboardPage | mirrored_repositories/simbasa/lib/view/DasboardPage/TransactionsPage/AddNasabahPage.dart | import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
import 'package:simbasa/provider/CreateProvider.dart';
import 'package:simbasa/theme/PaletteColor.dart';
import 'package:simbasa/theme/TypographyStyle.dart';
import 'package:simbasa/view/component/ap... | 0 |
mirrored_repositories/simbasa/lib/view/DasboardPage | mirrored_repositories/simbasa/lib/view/DasboardPage/TransactionsPage/PenyetoranPage.dart | import 'dart:ffi';
import 'package:flutter/material.dart';
import 'package:provider/provider.dart';
import 'package:simbasa/model/JenisSampah.dart';
import 'package:simbasa/provider/SetoranProvider.dart';
import 'package:simbasa/theme/PaletteColor.dart';
import 'package:simbasa/theme/TypographyStyle.dart';
import 'pac... | 0 |
mirrored_repositories/simbasa/lib/view/DasboardPage | mirrored_repositories/simbasa/lib/view/DasboardPage/TransactionsPage/PenarikanPage.dart | import 'package:flutter/material.dart';
import 'package:simbasa/theme/PaletteColor.dart';
import 'package:simbasa/theme/TypographyStyle.dart';
import 'package:simbasa/view/component/appbar/appbar.dart';
import 'package:flutter/cupertino.dart';
class PenarikanPage extends StatefulWidget {
@override
_PenarikanPageSt... | 0 |
mirrored_repositories/simbasa/lib/view/DasboardPage | mirrored_repositories/simbasa/lib/view/DasboardPage/HomePage/HomePage.dart | import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:simbasa/model/HomePageModel.dart';
import 'package:simbasa/theme/PaletteColor.dart';
import 'package:simbasa/view/DasboardPage/DataListPage/NasabahPage/NasabahPage.dart';
import 'package:simbasa/view/DasboardPage/DataListPa... | 0 |
mirrored_repositories/simbasa/lib/view/DasboardPage | mirrored_repositories/simbasa/lib/view/DasboardPage/UserBottomSheetFialog/UserBottomSheetDialog.dart | import 'package:flutter/material.dart';
import 'package:simbasa/theme/PaletteColor.dart';
import 'package:simbasa/theme/SpacingDimens.dart';
import 'package:simbasa/theme/TypographyStyle.dart';
import 'package:simbasa/view/DasboardPage/UserBottomSheetFialog/component/ConfirmationLogoutDialog.dart';
import 'package:simb... | 0 |
mirrored_repositories/simbasa/lib/view/DasboardPage/UserBottomSheetFialog | mirrored_repositories/simbasa/lib/view/DasboardPage/UserBottomSheetFialog/component/ConfirmationLogoutDialog.dart | import 'package:flutter/material.dart';
import 'package:shared_preferences/shared_preferences.dart';
import 'package:simbasa/theme/PaletteColor.dart';
import 'package:simbasa/theme/SpacingDimens.dart';
import 'package:simbasa/theme/TypographyStyle.dart';
import 'package:simbasa/view/SplashScreenPage/SplashscreenPage.da... | 0 |
mirrored_repositories/simbasa/lib/view/DasboardPage/DataListPage | mirrored_repositories/simbasa/lib/view/DasboardPage/DataListPage/SetoranPage/SetoranPage.dart | import 'package:flutter/material.dart';
import 'package:simbasa/model/HomePageModel.dart';
import 'package:simbasa/theme/PaletteColor.dart';
import 'package:simbasa/view/DasboardPage/DataListPage/NasabahPage/EditPage/EditPage.dart';
import 'package:simbasa/view/DasboardPage/component/chart/linecart.dart';
import 'packa... | 0 |
mirrored_repositories/simbasa/lib/view/DasboardPage/DataListPage | mirrored_repositories/simbasa/lib/view/DasboardPage/DataListPage/NasabahPage/NasabahPage.dart | import 'package:flutter/material.dart';
import 'package:intl/intl.dart';
import 'package:simbasa/model/HomePageModel.dart';
import 'package:simbasa/theme/PaletteColor.dart';
import 'package:simbasa/theme/TypographyStyle.dart';
import 'package:simbasa/view/DasboardPage/DataListPage/NasabahPage/EditPage/EditPage.dart';
i... | 0 |
mirrored_repositories/simbasa/lib/view/DasboardPage/DataListPage/NasabahPage | mirrored_repositories/simbasa/lib/view/DasboardPage/DataListPage/NasabahPage/EditPage/EditPage.dart | import 'package:flutter/material.dart';
import 'package:simbasa/theme/PaletteColor.dart';
import 'package:simbasa/theme/TypographyStyle.dart';
import 'package:simbasa/view/DasboardPage/DataListPage/component/ConfirmationDeleteDialog.dart';
import 'package:simbasa/view/component/appbar/appbar.dart';
class EditPage exte... | 0 |
mirrored_repositories/simbasa/lib/view/DasboardPage/DataListPage | mirrored_repositories/simbasa/lib/view/DasboardPage/DataListPage/component/ConfirmationDeleteDialog.dart | import 'package:flutter/material.dart';
import 'package:shared_preferences/shared_preferences.dart';
import 'package:simbasa/theme/PaletteColor.dart';
import 'package:simbasa/theme/SpacingDimens.dart';
import 'package:simbasa/theme/TypographyStyle.dart';
import 'package:simbasa/view/SplashScreenPage/SplashscreenPage.da... | 0 |
mirrored_repositories/simbasa/lib/view | mirrored_repositories/simbasa/lib/view/LoginPage/LoginPage.dart | import 'package:flutter/material.dart';
import 'package:shared_preferences/shared_preferences.dart';
import 'package:simbasa/config/GlobalKeySharedPref.dart';
import 'package:simbasa/theme/PaletteColor.dart';
import 'package:simbasa/theme/TypographyStyle.dart';
import 'package:simbasa/view/DasboardPage/DashboardPage.da... | 0 |
mirrored_repositories/simbasa/lib/view/LoginPage | mirrored_repositories/simbasa/lib/view/LoginPage/component/AuthLogin.dart |
import 'dart:convert';
import 'package:flutter/cupertino.dart';
import 'package:shared_preferences/shared_preferences.dart';
import 'package:http/http.dart' as http;
class AuthLogin{
static auth({@required String username, @required String password}) async{
SharedPreferences pref = await SharedPreferences.g... | 0 |
mirrored_repositories/simbasa/lib/view/LoginPage | mirrored_repositories/simbasa/lib/view/LoginPage/component/MainForms.dart | import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
import 'package:simbasa/theme/PaletteColor.dart';import 'package:simbasa/theme/TypographyStyle.dart';class MainForms extends StatefulWidget {
final TextEditingController nimFilter;
final TextEditingController passwordFilter;
MainF... | 0 |
mirrored_repositories/simbasa/lib/view/LoginPage | mirrored_repositories/simbasa/lib/view/LoginPage/component/ButtonLogin.dart |
import 'package:flutter/material.dart';
import 'package:simbasa/theme/PaletteColor.dart';
import 'package:simbasa/theme/TypographyStyle.dart';
class ButtonLogin extends StatelessWidget {
final onPressedFunction;
const ButtonLogin(this.onPressedFunction);
@override
Widget build(BuildContext context) {
... | 0 |
mirrored_repositories/simbasa/lib/view | mirrored_repositories/simbasa/lib/view/SplashScreenPage/SplashscreenPage.dart | import 'dart:async';
import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
import 'package:shared_preferences/shared_preferences.dart';
import 'package:simbasa/config/GlobalKeySharedPref.dart';
import 'package:simbasa/theme/PaletteColor.dart';
import 'package:simbasa/view/DasboardPage/Dashboa... | 0 |
mirrored_repositories/simbasa/lib/view/component | mirrored_repositories/simbasa/lib/view/component/appbar/appbar.dart | import 'package:flutter/material.dart';
import 'package:simbasa/theme/PaletteColor.dart';
import 'package:simbasa/theme/TypographyStyle.dart';
AppBar appbar({@required String title, List<Widget> action}) {
return AppBar(
backgroundColor: PaletteColor.primarybg2,
iconTheme: IconThemeData(
color: Colors.... | 0 |
mirrored_repositories/simbasa/lib/view/component | mirrored_repositories/simbasa/lib/view/component/Indicator/IndicatorLoad.dart | import 'package:flutter/material.dart';
import 'package:flutter_spinkit/flutter_spinkit.dart';
import 'package:simbasa/theme/PaletteColor.dart';
Widget indicatorLoad() {
return SpinKitFadingCircle(
size: 45,
itemBuilder: (BuildContext context, int index) {
return DecoratedBox(
decoration: BoxDe... | 0 |
mirrored_repositories/simbasa/lib/view | mirrored_repositories/simbasa/lib/view/ProfilePage/ProfilePage.dart | import 'package:flutter/material.dart';
import 'package:simbasa/theme/PaletteColor.dart';
import 'package:simbasa/theme/TypographyStyle.dart';
import 'package:simbasa/view/component/appbar/appbar.dart';
class ProfilePage extends StatefulWidget {
@override
_ProfilePageState createState() => _ProfilePageState();
}
... | 0 |
mirrored_repositories/simbasa/lib | mirrored_repositories/simbasa/lib/config/GlobalKeySharedPref.dart | class GlobalKeySharedPref {
// Random Key
static String keyPref = "Simbasa45-";
static String keyPrefIsLogin = keyPref + "LOGIN";
static String keyPrefUsername = keyPref + "USERNAME";
// Secure Key Cookie
static String secureKeyCookie = "__api-auth-q";
}
| 0 |
mirrored_repositories/simbasa/lib | mirrored_repositories/simbasa/lib/model/HomePageModel.dart | // To parse this JSON data, do
//
// final homePageModel = homePageModelFromJson(jsonString);
import 'package:meta/meta.dart';
import 'dart:convert';
HomePageModel homePageModelFromJson(String str) => HomePageModel.fromJson(json.decode(str));
String homePageModelToJson(HomePageModel data) => json.encode(data.toJ... | 0 |
mirrored_repositories/simbasa/lib | mirrored_repositories/simbasa/lib/model/JenisSampah.dart | // To parse this JSON data, do
//
// final jenisSampah = jenisSampahFromJson(jsonString);
import 'package:meta/meta.dart';
import 'dart:convert';
JenisSampah jenisSampahFromJson(String str) => JenisSampah.fromJson(json.decode(str));
String jenisSampahToJson(JenisSampah data) => json.encode(data.toJson());
class... | 0 |
mirrored_repositories/simbasa/lib | mirrored_repositories/simbasa/lib/theme/PaletteColor.dart | import 'package:flutter/material.dart';
class PaletteColor {
static const Color black = Colors.black;
/* Primary Color */
static const Color primary = Color(0xFFFF5B16);
static const Color primary80 = Color(0xFFFF704B);
static const Color primary60 = Color(0xFFFF9796);
static const Color primary40 = Color... | 0 |
mirrored_repositories/simbasa/lib | mirrored_repositories/simbasa/lib/theme/TypographyStyle.dart | import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:simbasa/theme/PaletteColor.dart';
class TypographyStyle {
/* HEADING */
static const TextStyle heading1 = TextStyle(
fontSize: 28,
fontWeight: FontWeight.w700,
color: PaletteColor.text,
fontFamily: 'Mul... | 0 |
mirrored_repositories/simbasa/lib | mirrored_repositories/simbasa/lib/theme/SpacingDimens.dart | class SpacingDimens {
static const spacing4 = 4.0;
static const spacing8 = spacing4 * 2;
static const spacing12 = spacing4 * 3;
static const spacing16 = spacing4 * 4;
static const spacing24 = spacing4 * 6;
static const spacing28 = spacing4 * 7;
static const spacing32 = spacing4 * 8;
static const spacing... | 0 |
mirrored_repositories/simbasa/lib | mirrored_repositories/simbasa/lib/provider/SetoranProvider.dart | import 'package:flutter/material.dart';
import 'package:shared_preferences/shared_preferences.dart';
import 'package:simbasa/model/JenisSampah.dart';
import 'package:http/http.dart' as http;
class SetoranProvider extends ChangeNotifier {
Future<JenisSampah> getJenisSampah() async {
SharedPreferences pref = await... | 0 |
mirrored_repositories/simbasa/lib | mirrored_repositories/simbasa/lib/provider/CreateProvider.dart | import 'package:shared_preferences/shared_preferences.dart';
import 'package:http/http.dart' as http;
class CreatePrivider {
static Future<bool> postNasabah({
String username,
String nama,
String alamat,
String phone,
String job,
String numberBank,
int saldo,
String password,
}) asy... | 0 |
mirrored_repositories/simbasa/lib | mirrored_repositories/simbasa/lib/provider/Auth.dart |
class Auth{
Future<bool> auth() async{
}
} | 0 |
mirrored_repositories/simbasa/lib | mirrored_repositories/simbasa/lib/provider/HomaPageProvider.dart |
import 'package:flutter/cupertino.dart';
import 'package:shared_preferences/shared_preferences.dart';
import 'package:http/http.dart' as http;
import 'package:simbasa/model/HomePageModel.dart';
class HomePageProvider extends ChangeNotifier{
Future<HomePageModel> getHomePageData() async{
SharedPreferences pre... | 0 |
mirrored_repositories/simbasa | mirrored_repositories/simbasa/test/widget_test.dart | // 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 value... | 0 |
mirrored_repositories/quran | mirrored_repositories/quran/lib/main.dart | import 'package:flutter/material.dart';
import 'package:provider/provider.dart';
import 'package:flutter_localizations/flutter_localizations.dart';
import 'package:flutter_gen/gen_l10n/app_localizations.dart';
import 'package:quran/tools/appconfig.dart';
import 'package:quran/tools/myThemeData.dart';
import 'package:qu... | 0 |
mirrored_repositories/quran/lib | mirrored_repositories/quran/lib/singleNavbarPages/Setting.dart | import 'package:flutter/material.dart';
import 'package:flutter_gen/gen_l10n/app_localizations.dart';
import 'package:provider/provider.dart';
import 'package:quran/tools/appconfig.dart';
class Setting extends StatefulWidget {
const Setting({Key? key}) : super(key: key);
@override
_SettingState createState() =... | 0 |
mirrored_repositories/quran/lib | mirrored_repositories/quran/lib/singleNavbarPages/navbar.dart | import 'package:flutter/material.dart';
import 'package:provider/provider.dart';
import 'package:quran/Ahadeeth/AhadeethMenu.dart';
import 'package:quran/singleNavbarPages/Setting.dart';
import '../Surah/ListOfSurahNames.dart';
import 'package:flutter_gen/gen_l10n/app_localizations.dart';
import 'Sebha.dart';
import 'p... | 0 |
mirrored_repositories/quran/lib | mirrored_repositories/quran/lib/singleNavbarPages/Sebha.dart | import 'dart:ui';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:provider/provider.dart';
import 'package:quran/tools/appconfig.dart';
import 'package:flutter_gen/gen_l10n/app_localizations.dart';
class Sebha extends StatefulWidget {
static const routeName = 'Sebha'... | 0 |
mirrored_repositories/quran/lib | mirrored_repositories/quran/lib/Surah/surahContent.dart | import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:flutter/services.dart' show rootBundle;
import 'package:provider/provider.dart';
import 'package:quran/Surah/ListOfSurahNames.dart';
import 'package:flutter_gen/gen_l10n/app_localizations.dart';
import 'dart:async';
impor... | 0 |
mirrored_repositories/quran/lib | mirrored_repositories/quran/lib/Surah/ListOfSurahNames.dart | import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:provider/provider.dart';
import 'package:quran/tools/appconfig.dart';
import 'package:quran/Surah/surahContent.dart';
import 'package:flutter_gen/gen_l10n/app_localizations.dart';
import 'package:flutter/services.dart' show... | 0 |
mirrored_repositories/quran/lib | mirrored_repositories/quran/lib/model/Radios.dart | class Radios {
String ?name = '';
String ?radioUrl = '';
Radios(
this.name,
this.radioUrl);
Radios.fromJson(dynamic json) {
name = json['name'];
radioUrl = json['radio_url'];
}
} | 0 |
mirrored_repositories/quran/lib | mirrored_repositories/quran/lib/model/RadioResponse.dart | import 'Radios.dart';
class RadioResponse {
List<Radios> radios = [];
RadioResponse({required List<Radios> radios}){
radios = radios;
}
RadioResponse.fromJson(dynamic json) {
if (json['radios'] != null) {
radios = [];
json['radios'].forEach((v) {
radios.add(Radios.fromJson(v));
... | 0 |
mirrored_repositories/quran/lib | mirrored_repositories/quran/lib/tools/myThemeData.dart | import 'package:flutter/material.dart';
import 'package:provider/provider.dart';
class MythemeData{
static final lightTheme=ThemeData(
primaryColor: Colors.black,
bottomAppBarColor: Colors.brown,
accentColor: Colors.black,
secondaryHeaderColor:Colors.white,
);
static final darkTheme=ThemeData(
primar... | 0 |
mirrored_repositories/quran/lib | mirrored_repositories/quran/lib/tools/appconfig.dart | import 'package:flutter/material.dart';
class appConfig extends ChangeNotifier {
appConfig(){}
ThemeMode themeMode = ThemeMode.dark;
String currentLanguage = 'en';
void toggleTheme() {
if (themeMode == ThemeMode.light)
themeMode = ThemeMode.dark;
else
themeMode = ThemeMode.light;
notify... | 0 |
mirrored_repositories/quran/lib | mirrored_repositories/quran/lib/APIs/APImanager.dart | import 'dart:convert';
import 'package:http/http.dart' as http;
import 'package:quran/model/RadioResponse.dart';
Future<RadioResponse> getRadios(String language) async {
language = language=='en'?'english':'arabic';
final uri = Uri.https("api.mp3quran.net", "/radios/radio_" + language + ".json");
final response ... | 0 |
mirrored_repositories/quran/lib | mirrored_repositories/quran/lib/Radio/AudioMethods.dart | import 'package:just_audio/just_audio.dart';
class AudioMethods{
late final AudioPlayer radioPlayer = AudioPlayer();
} | 0 |
mirrored_repositories/quran/lib | mirrored_repositories/quran/lib/Radio/listeningIcons.dart | import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:provider/provider.dart';
import 'package:quran/singleNavbarPages/navbar.dart';
import 'package:quran/tools/appconfig.dart';
class listeningIcons extends StatefulWidget {
late IconData icon;
late appConfig provider;
l... | 0 |
mirrored_repositories/quran/lib | mirrored_repositories/quran/lib/Radio/RadioPage.dart | import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:provider/provider.dart';
import 'package:quran/APIs/APImanager.dart';
import 'package:quran/Radio/listeningIcons.dart';
import 'package:quran/model/RadioResponse.dart';
import 'package:quran/model/Radios.dart';
import 'pack... | 0 |
mirrored_repositories/quran/lib | mirrored_repositories/quran/lib/Ahadeeth/AhadeethContent.dart | import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:flutter_gen/gen_l10n/app_localizations.dart';
import 'package:provider/provider.dart';
import 'package:flutter/services.dart' show rootBundle;
import 'dart:async';
import 'package:quran/singleNavbarPages/navbar.dart';
impor... | 0 |
mirrored_repositories/quran/lib | mirrored_repositories/quran/lib/Ahadeeth/AhadeethMenu.dart | import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:provider/provider.dart';
import 'package:quran/Ahadeeth/AhadeethContent.dart';
import 'package:flutter_gen/gen_l10n/app_localizations.dart';
import 'package:quran/tools/appconfig.dart';
class AhadeethMenu extends StatefulW... | 0 |
mirrored_repositories/quran | mirrored_repositories/quran/test/widget_test.dart | // 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 value... | 0 |
mirrored_repositories/signin-and-signup-UI-in-flutter | mirrored_repositories/signin-and-signup-UI-in-flutter/lib/main.dart | import 'package:flutter/material.dart';
import 'package:login_logout_screen/view/signin/signin.dart';
void main() {
runApp(MyApp());
}
class MyApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
return MaterialApp(
debugShowCheckedModeBanner: false,
title: 'Login / Logou... | 0 |
mirrored_repositories/signin-and-signup-UI-in-flutter/lib/view | mirrored_repositories/signin-and-signup-UI-in-flutter/lib/view/signup/signup.dart | import 'package:flutter/material.dart';
import 'package:login_logout_screen/view/signin/signin.dart';
import 'package:login_logout_screen/widgets/build_text.dart';
class Signup extends StatelessWidget {
@override
Widget build(BuildContext context) {
return SafeArea(
child: Scaffold(
appBar: AppBa... | 0 |
mirrored_repositories/signin-and-signup-UI-in-flutter/lib/view | mirrored_repositories/signin-and-signup-UI-in-flutter/lib/view/signin/signin.dart | import 'package:flutter/material.dart';
import 'package:login_logout_screen/view/signup/signup.dart';
import 'package:login_logout_screen/widgets/build_text.dart';
class Signin extends StatelessWidget {
@override
Widget build(BuildContext context) {
return SafeArea(
child: Scaffold(
body: Single... | 0 |
mirrored_repositories/signin-and-signup-UI-in-flutter/lib | mirrored_repositories/signin-and-signup-UI-in-flutter/lib/widgets/build_text.dart | import 'package:flutter/material.dart';
import 'package:google_fonts/google_fonts.dart';
class BuildText extends StatelessWidget {
final String text;
final int maxLines;
final TextOverflow textOverflow;
final TextAlign textAlign;
final Color color;
final double fontSize;
final FontWeight fontWeight;
c... | 0 |
mirrored_repositories/signin-and-signup-UI-in-flutter | mirrored_repositories/signin-and-signup-UI-in-flutter/test/widget_test.dart | // 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 value... | 0 |
mirrored_repositories/WeatherAppFlutter | mirrored_repositories/WeatherAppFlutter/lib/httppage.dart | import 'dart:convert';
// import 'package:dioapi/Content/Constants.dart';
import 'package:flutter/material.dart';
import 'package:http/http.dart' as http;
import 'Content/Constants.dart';
class HttpPage extends StatefulWidget {
@override
_HttpPageState createState() => _HttpPageState();
}
class _HttpPageState... | 0 |
mirrored_repositories/WeatherAppFlutter | mirrored_repositories/WeatherAppFlutter/lib/HomePage.dart | import 'package:flutter/material.dart';
import 'Content/Appbar.dart';
import 'Content/Body.dart';
class MyHomePage extends StatefulWidget {
@override
_MyHomePageState createState() => _MyHomePageState();
}
class _MyHomePageState extends State<MyHomePage> {
@override
Widget build(BuildContext context) {
r... | 0 |
mirrored_repositories/WeatherAppFlutter | mirrored_repositories/WeatherAppFlutter/lib/DioPackage.dart | import 'dart:convert';
import 'package:flutter/material.dart';
import 'package:dio/dio.dart';
import 'Content/Constants.dart';
import 'package:geolocator/geolocator.dart';
// hey guys today we are learing that how to get your current location weather using geolocation publication
class Home extends StatefulWidget {
... | 0 |
mirrored_repositories/WeatherAppFlutter | mirrored_repositories/WeatherAppFlutter/lib/main.dart | import 'package:flutter/material.dart';
import 'DioPackage.dart';
import 'HomePage.dart';
void main() {
runApp(MyApp());
}
class MyApp extends StatelessWidget {
// This widget is the root of your application.
@override
Widget build(BuildContext context) {
return MaterialApp(
title: ' Weather App',
... | 0 |
mirrored_repositories/WeatherAppFlutter/lib | mirrored_repositories/WeatherAppFlutter/lib/Content/Body.dart | import 'dart:ui';
import 'package:flutter/material.dart';
import 'package:flutter/rendering.dart';
import 'package:google_fonts/google_fonts.dart';
import 'Constants.dart';
import 'package:http/http.dart ' as http;
import 'dart:convert';
class BodyWidget extends StatefulWidget {
// create object of class to import ... | 0 |
mirrored_repositories/WeatherAppFlutter/lib | mirrored_repositories/WeatherAppFlutter/lib/Content/Appbar.dart | import 'package:flutter/material.dart';
import 'Constants.dart';
import 'package:google_fonts/google_fonts.dart';
bool value = false;
void onChanged(bool value) {
value = !value;
}
AppBar appBar = AppBar(
backgroundColor: Colors.transparent,
elevation: 0,
actions: [
Switch(
value: value,
onCha... | 0 |
mirrored_repositories/WeatherAppFlutter/lib | mirrored_repositories/WeatherAppFlutter/lib/Content/Constants.dart | import 'package:flutter/material.dart';
import 'package:google_fonts/google_fonts.dart';
TextStyle smallText = GoogleFonts.lato(
fontSize: 18,
color: Colors.white,
);
// image class to store details of all images i am gona use it in my projects.
String sun = 'assets/sun.png';
String fog = 'assets/fog.png';
String... | 0 |
mirrored_repositories/WeatherAppFlutter | mirrored_repositories/WeatherAppFlutter/test/widget_test.dart | // 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 value... | 0 |
mirrored_repositories/SMIT-FLUTTER | mirrored_repositories/SMIT-FLUTTER/assigment-2/Question_17.dart | // Given a list of integers, write a Dart function named squareValues that uses the map() method to create a new list with each value squared. The function should take in the original list as a parameter and return the new list.
void main() {
List<int> originalList = [1, 2, 3, 4, 5];
List<int> squaredList = squar... | 0 |
mirrored_repositories/SMIT-FLUTTER | mirrored_repositories/SMIT-FLUTTER/assigment-2/Question_15.dart | //Implement a Dart function named getPositiveNumbers that uses the where() method to filter out negative numbers from a list of integers. The function should take in the original list as a parameter and return a new list containing only the positive numbers.
void main() {
List<int> originalList = [-2, 5, -8, 1, 0, 3... | 0 |
mirrored_repositories/SMIT-FLUTTER | mirrored_repositories/SMIT-FLUTTER/assigment-2/Question_8.dart | // remove all false values from below list by using removeWhere or retainWhere property.
void main() {
List<Map<String, dynamic>> usersEligibility = [
{'name': 'John', 'eligible': true},
{'name': 'Alice', 'eligible': false},
{'name': 'Mike', 'eligible': true},
{'name': 'Sarah', 'eligible': true},
... | 0 |
mirrored_repositories/SMIT-FLUTTER | mirrored_repositories/SMIT-FLUTTER/assigment-2/Question_3.dart | // Create a list of Days and remove one by one from the end of list
void main() {
List<String> daysOfWeek = [
'Monday',
'Tuesday',
'Wednesday',
'Thursday',
'Friday',
'Saturday',
'Sunday'
];
print('Original List: $daysOfWeek');
daysOfWeek.remove("Monday");
print(daysOfWeek);
days... | 0 |
mirrored_repositories/SMIT-FLUTTER | mirrored_repositories/SMIT-FLUTTER/assigment-2/Question_7.dart | /*Map<String, double> expenses = {
'sun': 3000.0,
'mon': 3000.0,
'tue': 3234.0,
};
Check if "fri" exist in expanses; if exist change it's value to 5000.0 otherwise
add 'fri' to expenses and set its value to 5000.0 then print expenses*/
void main() {
Map<String, double> expenses = {
'sun': 3000.0,
'mon'... | 0 |
mirrored_repositories/SMIT-FLUTTER | mirrored_repositories/SMIT-FLUTTER/assigment-2/Question_16.dart | //Implement a Dart function named getEvenNumbers that uses the where() method to filter out odd numbers from a list of integers. The function should take in the original list as a parameter and return a new list containing only the even numbers.
void main() {
List<int> originalList = [1, 2, 3, 4, 5, 6, 7, 8, 9];
... | 0 |
mirrored_repositories/SMIT-FLUTTER | mirrored_repositories/SMIT-FLUTTER/assigment-2/Question_21.dart | //Given a map representing a user with keys "name", "isAdmin", and "isActive", write Dart code to check if the user is an active admin. If the user is both an admin and active, print "Active admin", otherwise print "Not an active admin"
void main() {
Map<String, dynamic> user = {
'name': 'John',
'isAdmin': tr... | 0 |
mirrored_repositories/SMIT-FLUTTER | mirrored_repositories/SMIT-FLUTTER/assigment-2/Question_1.dart | //Create a list of names and print all names using the List method.
void main() {
List<String> listNames = ["Aamir", "Zain", "Israr", "Naveed", "Farhan"];
print(listNames);
}
| 0 |
mirrored_repositories/SMIT-FLUTTER | mirrored_repositories/SMIT-FLUTTER/assigment-2/Question_18.dart | //Create a map named "person" with the following key-value pairs: "name" as "John", "age" as 25, "isStudent" as true. Write a Dart code to check if the person is both a student and over 18 years old. Print "Eligible" if both conditions are true, otherwise print "Not eligible"
void main() {
Map<String, dynamic> person... | 0 |
mirrored_repositories/SMIT-FLUTTER | mirrored_repositories/SMIT-FLUTTER/assigment-2/Question_2.dart | //Create an empty list of type string called days. Use the add method to add names of 7 days and print all days
void main() {
List<String> days = []; // creating an empty list of type string called days
days.add("Monday"); // adding names of 7 days using add() method
days.add("Tuesday");
days.add("Wednesday");
... | 0 |
mirrored_repositories/SMIT-FLUTTER | mirrored_repositories/SMIT-FLUTTER/assigment-2/Question_20.dart | //Create a map named "car" with the following key-value pairs: "brand" as "Toyota", "color" as "Red", "isSedan" as true. Write Dart code to check if the car is a sedan and red in color. Print "Match" if both conditions are true, otherwise print "No match
void main() {
Map<String, dynamic> car = {
'brand': 'Toyota... | 0 |
mirrored_repositories/SMIT-FLUTTER | mirrored_repositories/SMIT-FLUTTER/assigment-2/Question_13.dart | //Implement a code that takes in a list of integers and returns a new list containing only the unique elements from the original list. The order of elements in the new list should be the same as in the original list
void main() {
List<int> originalList = [1, 2, 3, 2, 4, 1, 5, 3];
List<int> uniqueList = originalLis... | 0 |
mirrored_repositories/SMIT-FLUTTER | mirrored_repositories/SMIT-FLUTTER/assigment-2/Question_22.dart | //Given a map representing a shopping cart with keys as product names and values as quantities, write Dart code to check if a product named "Apple" exists in the cart. Print "Product found" if it exists, otherwise print "Product not found"
void main() {
Map<String, int> shoppingCart = {
'Apple': 2,
'Banana': ... | 0 |
mirrored_repositories/SMIT-FLUTTER | mirrored_repositories/SMIT-FLUTTER/assigment-2/Question_19.dart | //Given a map representing a product with keys "name", "price", and "quantity", write Dart code to check if the product is in stock. If the quantity is greater than 0, print "In stock", otherwise print "Out of stock"
void main() {
Map<String, dynamic> product = {
'name': 'Apple iPhone',
'price': 200.00,
... | 0 |
mirrored_repositories/SMIT-FLUTTER | mirrored_repositories/SMIT-FLUTTER/assigment-2/Question_11.dart | //Write a Dart code that takes in a list and an integer n as parameters. The function should return a new list containing the first n elements from the original list.
void main() {
List<int> originalList = [1, 2, 3, 4, 5, 6, 7, 8];
int n = 3;
List<int> resultList = originalList.take(n).toList();
print("Origin... | 0 |
mirrored_repositories/SMIT-FLUTTER | mirrored_repositories/SMIT-FLUTTER/assigment-2/Question_5.dart | //Create a map with name, phone keys and store some values to it. Use where to find all keys that have length 4
void main() {
Map<String, String> contacts = {
'Aamir': '123-456-7890',
'Zain': '234-567-89071',
'Naveed': '345-678-9912'
};
var keysWithLength4 = contacts.keys.where((key) => key.length == ... | 0 |
mirrored_repositories/SMIT-FLUTTER | mirrored_repositories/SMIT-FLUTTER/assigment-2/Question_9.dart | //Given a list of integers, write a dart code that returns the maximum value from the list.
void main() {
List<int> numbers = [10, 5, 7, 15, 3, 20, 9];
int maxValue =
numbers.reduce((value, element) => value > element ? value : element);
int minValue =
numbers.reduce((value, element) => value < eleme... | 0 |
mirrored_repositories/SMIT-FLUTTER | mirrored_repositories/SMIT-FLUTTER/assigment-2/Question_6.dart | //Create Map variable name world then inside it create countries Map, Key will be the name country & country value will have another map having capitalCity, currency and language to it. by using any country key print all the value of Capital & Currency
void main() {
Map<String, Map<String, String>> world = {
'Pak... | 0 |
mirrored_repositories/SMIT-FLUTTER | mirrored_repositories/SMIT-FLUTTER/assigment-2/Question_10.dart | // Write a Dart code that takes in a list of strings and removes any duplicate elements, returning a new list without duplicates. The order of elements in the new list should be the same as in the original list
void main() {
List<String> originalList = [
'apple',
'banana',
'orange',
'banana',
'kiw... | 0 |
mirrored_repositories/SMIT-FLUTTER | mirrored_repositories/SMIT-FLUTTER/assigment-2/Question_14.dart | //Write a Dart function named sortList that takes in a list of integers and returns a new list with the elements sorted in ascending order. The original list should remain unchanged.void main() {
void main() {
List<int> originalList = [5, 2, 8, 1, 3];
originalList.sort((a, b) => a.compareTo(b));
List<int> numbe... | 0 |
mirrored_repositories/SMIT-FLUTTER | mirrored_repositories/SMIT-FLUTTER/assigment-2/Question_4.dart | // Create a list of numbers and create one empty list, now check for every index number is EVEN or ODD. if number is even then add true into empty list and if number is odd then add false into empty list, both list needs to print at the end
//without using loop
void main() {
List<int> numbers = [1, 2, 3, 4, 5, 6, 7, ... | 0 |
mirrored_repositories/SMIT-FLUTTER | mirrored_repositories/SMIT-FLUTTER/assigment-2/Question_12.dart | //Write a Dart code that takes in a list of strings and returns a new list with the elements in reverse order. The original list should remain unchanged
void main() {
List<String> originalList = [
'apple',
'banana',
'orange',
'Mango',
'Pineapple'
];
List<String> reversedList = originalList.re... | 0 |
mirrored_repositories/SMIT-FLUTTER | mirrored_repositories/SMIT-FLUTTER/assigment-1/Question_8.dart | /*---------------SMIT FLUTTER ----------------*/
void main() {
//Create a marksheet using operators of at least 5 subjects and
//output should have Student Name, Student Roll Number, Class, Percentage, Grade Obtained etc.
//i.e: Percentage should be rounded upto 2 decimal places only?
String studentName = "Aamir Sid... | 0 |
mirrored_repositories/SMIT-FLUTTER | mirrored_repositories/SMIT-FLUTTER/assigment-1/Question_3.dart | /*---------------SMIT FLUTTER ----------------*/
void main() {
//A student will not be allowed to sit in exam if his/her attendance is less than 75%.
//Create integer variables and assign value:
//Number of classes held = 16,
//Number of classes attended = 10,
//and print percentage of class attended.
//Is student is a... | 0 |
mirrored_repositories/SMIT-FLUTTER | mirrored_repositories/SMIT-FLUTTER/assigment-1/Question_7.dart | /*---------------SMIT FLUTTER ----------------*/
void main() {
//Write a program to calculate and print the Electricity bill of a given customer.
//Create variable for customer id, name, unit consumed by the user,
//bill_amount and print the total amount the customer needs to pay.
//The charge are as follow
int cust... | 0 |
mirrored_repositories/SMIT-FLUTTER | mirrored_repositories/SMIT-FLUTTER/assigment-1/Question_1.dart | /*---------------SMIT FLUTTER ----------------*/
void main() {
//Create two integer variables length and breadth
//and assign values then check if they are square values or rectangle values.ie:
//if both values are equal then it's square otherwise rectangle
int lenght = 12;
int breadth = 12;
if (lenght == breadt... | 0 |
mirrored_repositories/SMIT-FLUTTER | mirrored_repositories/SMIT-FLUTTER/assigment-1/Question_2.dart | /*---------------SMIT FLUTTER ----------------*/
void main() {
//Take two variables and store age then using if/else condition to determine oldest
//and youngest among them
int age1 = 25;
int age2 = 30;
if (age1 > age2) {
print("Age 1 is the oldest");
print("Age 2 is the youngest");
} else if (age2 > ... | 0 |
mirrored_repositories/SMIT-FLUTTER | mirrored_repositories/SMIT-FLUTTER/assigment-1/Question-4.dart | /*---------------SMIT FLUTTER ----------------*/
void main() {
//Create integer variable assign any year to it and check if a year is leap year or not.
//If a year is divisible by 4 then it is leap year but if the year is century year like 2000, 1900, 2100 then
// it must be divisible by 400.i.e: Use % ( modulus ) oper... | 0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.