Skip to content

Instantly share code, notes, and snippets.

View haidar786's full-sized avatar
🏠
Working from home

Hussnain Haidar haidar786

🏠
Working from home
View GitHub Profile
@haidar786
haidar786 / Translated file
Created December 11, 2017 11:32
Translated
export default {
aor: {
action: {
delete: 'حذف',
show: 'تبين',
list: 'List',
save: 'حفظ',
create: 'خلق',
edit: 'تصحيح',
cancel: 'إلغاء',
@haidar786
haidar786 / Translated file 2
Last active December 12, 2017 09:27
Translated 2
export default {
cat: {
list: {
title: "الاقسام",
labelName: "اسم",
labelCar: "سيارة",
search: "بحث",
filterCar: "السيارة فقط؟"
},
create: {
import 'package:flutter/material.dart';
class DropDownFormField extends FormField<dynamic> {
final String titleText;
final String hintText;
final bool required;
final String errorText;
final dynamic value;
final List dataSource;
final String textField;
Future<List<VideoModel>> _getVideosFromStorage() async {
if (_videoModel == null) {
List<VideoModel> videoModel = [];
List<String> directories = [];
List<FileSystemEntity> files = [];
Directory directory = Directory('/storage/emulated/0/');
List<FileSystemEntity> allFiles =
directory.listSync(recursive: true, followLinks: false);
allFiles.forEach((file) {
if (file.path.endsWith('.mp4')) {
void main() => runApp(MyApp());
class MyApp extends StatefulWidget {
@override
State<StatefulWidget> createState() {
return MyAppState();
}
}
enum Options { referrals, stats, editProfile }
import 'dart:convert';
import 'package:flutter/material.dart';
class ListItem extends StatelessWidget {
final posts = News.fromJson({"status":"ok","posts": [{ "title":"Barcelona 0-0 Real Madrid: Bale goal disallowed in tense Clasico","content": "Gareth Bale saw a goal disallowed as Barcelona and Real Madrid played out a 0-0 draw at Camp Nou on Wednesday. LaLiga's top two went into the contest level on points this season and with 72 wins each from previous league meetings, and there was nothing to separate them in a tense clash in Catalonia. The match was rearranged from October after the initial date became a security risk due to the prospect of Catalan independence protests, and there were fans inside and outside the stadium making their voices heard over one of Spain's most divisive issues.", "date": "2019-12-21 11:27:25","thumbnail_image": {"medium_large": { "url": "https://www.livescore.com/newsapi/04/soccer/imageret/barcelona-real-madrid-gareth-bale-goal-disallowed-tense-clasico-7-1cgsl7i
import 'package:flutter/material.dart';
import 'package:torch/torch.dart';
class SwithS extends StatefulWidget{
@override
State<StatefulWidget> createState() {
return SwitchWidgetClass();
}
}
import 'dart:io';
import 'dart:ui' as ui;
import 'package:flutter/material.dart';
import 'package:image_crop_widget/image_crop_widget.dart';
class FinalImagePage extends StatefulWidget {
final File image;
FinalImagePage(this.image);
@override
{
"id": 1,
"breed": "Rottweiler",
"name": "Mackie",
"age": 8
}
class Dog {
int id;
String breed;