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
# Do not remove or rename entries in this file, only add new ones | |
# See https://github.com/flutter/flutter/issues/128635 for more context. | |
# Miscellaneous | |
*.class | |
*.lock | |
*.log | |
*.pyc | |
*.swp | |
.DS_Store |
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() { | |
print('Start of Task A'); | |
taskA(); | |
print('End of Task A\n'); | |
print('Start of Task B'); | |
taskB(); | |
print('End of Task B'); | |
} |
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:geolocator/geolocator.dart'; | |
class GetLocationState { | |
final Position? position; | |
final LocationPermission permission; | |
GetLocationState({ | |
this.position, | |
required this.permission, | |
}); |
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:geolocator/geolocator.dart'; | |
sealed class LocationState { | |
final bool isServiceEnabled; | |
final LocationPermission permissionState; | |
const LocationState( | |
{required this.isServiceEnabled, required this.permissionState}); | |
} |
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
<?xml version="1.0" encoding="UTF-8"?> | |
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | |
<plist version="1.0"> | |
<dict> | |
<!-- =============START OF LOCATION PERMISSIONS============= --> | |
<!-- Here we are adding the location permissions, since this is production we are adding multiple permissions and their descriptions --> | |
<key>NSLocationAlwaysAndWhenInUseUsageDescription</key> | |
<string>We use your location data to send you notifications when you check in to certain places to enhance your experience in our app.</string> | |
<key>NSLocationAlwaysUsageDescription</key> | |
<string>Our app may also use your location in the background to send you timely notifications about important community alerts and updates relevant to your area, even when you're not actively using the app.</string> |
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
<manifest xmlns:android="http://schemas.android.com/apk/res/android"> | |
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" /> | |
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" /> | |
<application | |
android:label="flutter_location_permissions_handling" | |
android:name="${applicationName}" | |
android:icon="@mipmap/ic_launcher"> | |
<activity | |
android:name=".MainActivity" |
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
/** For this example, assume that | |
* public static final int GENDER_MALE = 0; | |
* public static final int GENDER_FEMALE = 1; | |
**/ | |
String[] projection = { PetEntry.COLUMN_PET_BREED, | |
PetEntry.COLUMN_PET_WEIGHT }; | |
String selection = PetEntry.COLUMN_PET_GENDER + “=?”; | |
String selectionArgs = new String[] { PetEntry.GENDER_FEMALE }; |
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
package com.example.android.sunshine.app.data; | |
import android.content.ContentResolver; | |
import android.content.ContentUris; | |
import android.net.Uri; | |
import android.provider.BaseColumns; | |
import android.text.format.Time; | |
/** |
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
public final class StoreContract { | |
public static abstract class HeadphoneEntry implements BaseColumns { | |
public static final String TABLE_NAME = "headphones"; | |
public static final String COLUMN_NAME = "name"; | |
public static final String COLUMN_PRICE = "price"; | |
public static final String COLUMN_STYLE = "style"; | |
public static final String COLUMN_IN_STOCK = "in_stock"; | |
public static final String COLUMN_DESCRIPTION = "description"; |
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
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" | |
xmlns:tools="http://schemas.android.com/tools" | |
android:layout_width="match_parent" | |
android:layout_height="?android:attr/listPreferredItemHeight" | |
android:orientation="horizontal" | |
android:paddingEnd="16dp" | |
android:paddingLeft="16dp" | |
android:paddingRight="16dp" | |
android:paddingStart="16dp"> | |
<TextView |
NewerOlder