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
<VirtualHost *:80> | |
DocumentRoot "F:\xampp\htdocs" | |
ServerName sites.local | |
ServerAlias *.sites.local | |
SSLEngine on | |
SSLCertificateFile "crt/sites.local/server.crt" | |
SSLCertificateKeyFile "crt/sites.local/server.key" | |
</VirtualHost> |
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
File? croppedfile = await ImageCropper.cropImage( | |
sourcePath: imagepath, | |
aspectRatioPresets: [ | |
CropAspectRatioPreset.square, | |
CropAspectRatioPreset.ratio3x2, | |
CropAspectRatioPreset.original, | |
CropAspectRatioPreset.ratio4x3, | |
CropAspectRatioPreset.ratio16x9 | |
], | |
androidUiSettings: AndroidUiSettings( |
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
DropdownButton( | |
value: _selectedItem, | |
items: _dropdownItems, | |
onChanged: (value) { | |
setState(() { | |
_selectedItem = value; | |
}); | |
}, | |
style: TextStyle(color: Colors.white), | |
dropdownColor: Colors.blue, |
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:dio/dio.dart'; | |
class ApiProvider { | |
Dio _dio; | |
String aToken = ''; | |
final BaseOptions options = new BaseOptions( | |
baseUrl: 'http://3.8.141.177:6001/gateway', | |
connectTimeout: 15000, | |
receiveTimeout: 13000, |
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
<uses-permission android:name="android.permission.INTERNET" /> | |
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" /> | |
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" /> |
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 MyHomePage extends StatelessWidget { | |
@override | |
Widget build(BuildContext context) { | |
return WillPopScope( | |
onWillPop: () async => false, | |
child: Scaffold( | |
// Your app content goes here | |
), | |
); | |
} |
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
ASN1Parser p = ASN1Parser(der); | |
ASN1Sequence signedCert = p.nextObject() as ASN1Sequence; | |
ASN1Sequence cert = signedCert.elements[0] as ASN1Sequence; | |
ASN1Sequence pubKeyElement = cert.elements[6] as ASN1Sequence; | |
ASN1BitString pubKeyBits = pubKeyElement.elements[1] as ASN1BitString; | |
List<int> encodedPubKey = pubKeyBits.stringValue; | |
// could stop here and compare the encoded key parts, or... |
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:path_provider/path_provider.dart'; | |
Future<void> main() async { | |
// Get the temporary directory | |
final directory = await getTemporaryDirectory(); | |
final file = File('${directory.path}/my_file.txt'); | |
// Write to the file | |
await file.writeAsString('Hello, World!'); |
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
ListView.builder( | |
scrollDirection: Axis.horizontal, | |
itemCount: items.length, | |
itemBuilder: (context, index) { | |
return Container( | |
width: 160.0, | |
child: Card( | |
child: Text(items[index]), | |
), | |
); |
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:firebase_messaging/firebase_messaging.dart'; | |
final FirebaseMessaging _firebaseMessaging = FirebaseMessaging(); | |
// ... | |
_firebaseMessaging.sendToTopic('your-topic', | |
'aps': { | |
'badge': 5, // Set the badge count to 5 | |
}, |
NewerOlder