repo_id
stringlengths 21
168
| file_path
stringlengths 36
210
| content
stringlengths 1
9.98M
| __index_level_0__
int64 0
0
|
---|---|---|---|
mirrored_repositories/Flare/lib/core | mirrored_repositories/Flare/lib/core/widgets/dialog_widget.dart | import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
class CustomDialog extends StatelessWidget {
String message;
CustomDialog({
required this.message,
});
@override
Widget build(BuildContext context) {
return AlertDialog(
title: const Text('AlertDialog Title'),
content: Text(message),
actions: <Widget>[
TextButton(
onPressed: () => {Navigator.pop(context, 'Cancel')},
child: const Text('Cancel'),
),
TextButton(
onPressed: () => {Navigator.pop(context, 'OK')},
child: const Text('OK'),
),
],
);
}
}
| 0 |
mirrored_repositories/Flare/lib/core | mirrored_repositories/Flare/lib/core/widgets/page_not_found.dart | import 'package:flutter/cupertino.dart';
import 'package:flare/core/utils/string_constants.dart';
class NotFoundPage extends StatelessWidget {
@override
Widget build(BuildContext context) {
return Container(
child: Center(
child: Text(StringConstants.screenNotImplemented),
),
);
}
}
| 0 |
mirrored_repositories/Flare/lib/core | mirrored_repositories/Flare/lib/core/widgets/appbar_widget.dart | import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
import 'package:flare/core/style/color_constants.dart';
import 'package:flare/core/utils/app_constants.dart';
/// AppBarWidget - use for show toolbar or header
/// @param [message] : The appbar title
/// @param [leading] : The left side icon
/// @param [actionList] : The right side icon list or action buttons
class AppBarWidget extends StatefulWidget implements PreferredSizeWidget {
String message;
Widget? leading;
List<Widget>? actionList = List.empty(growable: true);
AppBarWidget({required this.message, this.actionList, this.leading})
: super(key: Key(message));
@override
State<AppBarWidget> createState() => _AppBarWidgetState();
@override
Size get preferredSize => const Size.fromHeight(kToolbarHeight);
}
class _AppBarWidgetState extends State<AppBarWidget> {
@override
Widget build(BuildContext context) {
return Column(
children: [
AppBar(
title: Text(widget.message),
leading: widget.leading,
actions: widget.actionList,
toolbarHeight: AppConstants.appBarHeight,
backgroundColor: ColorConstants.primary,
shadowColor: ColorConstants.gray20,
centerTitle: true,
systemOverlayStyle: const SystemUiOverlayStyle(
statusBarColor: ColorConstants.primary,
statusBarIconBrightness: Brightness.dark,
statusBarBrightness: Brightness.light,
),
)
],
);
}
}
| 0 |
mirrored_repositories/Flare/lib/core | mirrored_repositories/Flare/lib/core/widgets/loading_widget.dart | import 'package:flutter/material.dart';
class LoadingWidget extends StatelessWidget {
const LoadingWidget({
required Key key,
}) : super(key: key);
@override
Widget build(BuildContext context) {
return Container(
height: MediaQuery.of(context).size.height,
child: Center(
child: CircularProgressIndicator(),
),
);
}
}
| 0 |
mirrored_repositories/Flare/lib/core | mirrored_repositories/Flare/lib/core/widgets/message_display.dart | import 'package:flutter/material.dart';
class MessageDisplay extends StatelessWidget {
final String message;
const MessageDisplay({
required Key key,
required this.message,
}) : super(key: key);
@override
Widget build(BuildContext context) {
return Container(
height: MediaQuery.of(context).size.height / 3,
child: Center(
child: SingleChildScrollView(
child: Text(
message,
style: TextStyle(fontSize: 16),
textAlign: TextAlign.center,
),
),
),
);
}
}
| 0 |
mirrored_repositories/Flare/lib/core | mirrored_repositories/Flare/lib/core/widgets/home_chapter_widget.dart | import 'package:beamer/beamer.dart';
import 'package:flare/HomeScreen.dart';
import 'package:flare/core/utils/app_constants.dart';
import 'package:flare/core/utils/string_constants.dart';
import 'package:flutter/material.dart';
class ChapterWidget extends StatefulWidget {
final Chapter chapter;
const ChapterWidget({required this.chapter}) : super(key: const Key(StringConstants.keyChapter));
@override
_ChapterWidgetState createState() {
return _ChapterWidgetState();
}
}
class _ChapterWidgetState extends State<ChapterWidget> {
var isSelected = false;
@override
void initState() {
super.initState();
}
@override
void dispose() {
super.dispose();
}
@override
Widget build(BuildContext context) {
return Card(
color: (isSelected == true) ? const Color(0xFFEEEEEE) : Colors.white,
elevation: 2,
shape: RoundedRectangleBorder(
side: BorderSide(
color: Theme.of(context).colorScheme.outline,
),
borderRadius: const BorderRadius.all(Radius.circular(8)),
),
child: InkWell(
child: Padding(
padding: const EdgeInsets.symmetric(
vertical: AppConstants.twelve, horizontal: AppConstants.eight),
child: Text(widget.chapter.name),
),
onTap: () {
setState(() {
isSelected = true;
});
setState(() {
Future.delayed(const Duration(milliseconds: 200), () {
context.beamToNamed(widget.chapter.route, data: widget.chapter);
setState(() {
isSelected = false;
});
});
});
},
),
);
}
}
| 0 |
mirrored_repositories/Flare/lib/core | mirrored_repositories/Flare/lib/core/models/OptionItem.dart |
class OptionItem {
int id;
String name;
bool isSelected = false;
OptionItem(this.id, this.name, this.isSelected);
}
| 0 |
mirrored_repositories/Flare/lib/core | mirrored_repositories/Flare/lib/core/utils/logger.dart | class Logger {
static void d(String msg) {
print(msg);
}
}
| 0 |
mirrored_repositories/Flare/lib/core | mirrored_repositories/Flare/lib/core/utils/string_constants.dart | /// Application constant class which hold all app level constants
class StringConstants {
///app name
static const String appName = "Flare";
static const String empty = "";
static const String space = " ";
static const String dash = "-";
///Screens
static const String screenNotImplemented = "Screen Not Implemented";
static const String screenUiComponentText = "Text & Input Field";
static const String screenUiComponentButton = "Buttons";
static const String screenUiComponentAppBar = "AppBar";
static const String screenUiComponentBottomNavBar = "Bottom Navigation";
static const String screenUiComponentDrawer = "Drawer";
static const String screenUiComponentTabBar = "TabBar";
static const String screenUiComponentDialogs = "Dialog & Alerts";
static const String screenUiComponentCardAndChips = "Cards & List Tile & Chip";
static const String screenBlocHttpApiCall = "Bloc - Simple HTTP Api Call";
static const String screenBrowserUrlLaunch = "Browser - URL";
static const String screenLocalization = "Localization";
static const String screenLocation = "Location";
static const String screenGraphQL = "Graph QL";
static const String screenGallery = "Gallery";
static const String screenFirebaseNotification = "Firebase Notification";
///error - strings
static const String unknownError = "Unknown Error";
static const String noDataFound = 'No data found';
static const String unAuthorizedFailure = 'User Un-Authorized. Please login to continue';
static const String serverFailure = 'Server Failure';
static const String cacheFailure = 'Cache Failure';
static const String invalidInputNumber =
'Invalid Input - The number must be a positive integer or zero.';
///permission - strings
static const String openSettings = "Open Settings";
///temp strings
static const String dummyFlutter = "Flutter is an open source framework by Google for building beautiful, natively compiled, multi-platform applications from a single codebase.";
static const String dummyFlutterShort = "Flutter is an open source framework";
///Widget Keys
static const String keyChapter = "key_chapter";
static const String keyAlbumScreen = "key_album_list";
static const String keyGalleryScreen = "key_gallery";
}
| 0 |
mirrored_repositories/Flare/lib/core | mirrored_repositories/Flare/lib/core/utils/app_constants.dart | /// Application constant class which hold all app level constants
class AppConstants {
/// String constant
/// int constants
static const int offset = 0;
static const int page = 0;
static const int pageSize = 20;
static const int searchOffset = 3;
/// float constants
/// double constants
static const double appBarHeight = 54.0;
static const double appBarDividerHeight = 2.0;
static const double eight = 8.0;
static const double twelve = 12.0;
static const double sixteen = 16.0;
}
| 0 |
mirrored_repositories/Flare/lib/core | mirrored_repositories/Flare/lib/core/utils/size_calculator.dart | import 'package:flutter/material.dart';
/// Size calculator used for calculate each component size
/// Design team use 812 height & 375 width
class SizeCalculator {
/// get device height
/// @param [context] : build context
/// @return [double] - height of device
static double getDeviceHeight(BuildContext context) {
return MediaQuery.of(context).size.height;
}
/// get device Width
/// @param [context] : build context
/// @return [double] - width of device
static double getDeviceWidth(BuildContext context) {
return MediaQuery.of(context).size.width;
}
/// get component height
/// @param [context] : context
/// @param [value] : percentile height
/// @return [double] - height of component
/// UI team taken 812 px height - App Bar is 46px so
/// Percentile height (46 / 812) = 0.056
static double getComponentHeight(BuildContext context, double value) {
return getDeviceHeight(context) * value;
}
/// get component width
/// @param [context] : context
/// @param [value] : percentile width
/// @return [double] - width of component
/// UI team taken 375px width - splash icon is 144 by 144 px so
/// Percentile height (144 / 375) = 0.384
/// If component is square then use width
static double getComponentWidth(BuildContext context, double value) {
return getDeviceWidth(context) * value;
}
}
| 0 |
mirrored_repositories/Flare/lib/core | mirrored_repositories/Flare/lib/core/localization/app_localization_delegate.dart | // #docregion Delegate
import 'package:flutter/cupertino.dart';
import 'package:flutter/foundation.dart';
import 'package:flare/core/localization/app_localization.dart';
class AppLocalizationsDelegate
extends LocalizationsDelegate<AppLocalization> {
const AppLocalizationsDelegate();
@override
bool isSupported(Locale locale) => AppLocalization.languages().contains(locale.languageCode);
@override
Future<AppLocalization> load(Locale locale) {
// Returning a SynchronousFuture here because an async "load" operation
// isn't needed to produce an instance of DemoLocalizations.
return SynchronousFuture<AppLocalization>(AppLocalization(locale));
}
@override
bool shouldReload(AppLocalizationsDelegate old) => false;
}
// #enddocregion Delegate | 0 |
mirrored_repositories/Flare/lib/core | mirrored_repositories/Flare/lib/core/localization/app_localization.dart | import 'dart:ui';
import 'package:flutter/cupertino.dart';
class AppLocalization {
AppLocalization(this.locale);
final Locale locale;
static AppLocalization of(BuildContext context) {
return Localizations.of<AppLocalization>(context, AppLocalization)!;
}
static const _localizedValues = <String, Map<String, String>>{
'en': {
'title': 'Hello World',
},
'es': {
'title': 'Hola Mundo',
},
'ar': {
'title': 'مرحبا بالعالم',
},
};
static List<String> languages() => _localizedValues.keys.toList();
String get title {
return _localizedValues[locale.languageCode]!['title']!;
}
}
| 0 |
mirrored_repositories/Flare/lib/core | mirrored_repositories/Flare/lib/core/style/styles.dart | import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
///Styles class that hold all widget styles - i.e - typography, buttons, etc.
class Styles{
///fontWeight
static const fontWeightSemiBold = FontWeight.w600;
static const fontWeightRegular = FontWeight.w400;
///fontSize
static const fontSizeH1 = 32.0;
static const fontSizeH2 = 28.0;
static const fontSizeH3 = 24.0;
static const fontSizeH4 = 20.0;
static const fontSizeH5 = 16.0;
static const fontSizeH6 = 12.0;
///Headline
static const h1SemiBold = TextStyle(fontWeight: fontWeightSemiBold, fontSize: fontSizeH1);
static const h1Regular = TextStyle(fontWeight: fontWeightRegular, fontSize: fontSizeH1);
static const h2SemiBold = TextStyle(fontWeight: fontWeightSemiBold, fontSize: fontSizeH2);
static const h2Regular = TextStyle(fontWeight: fontWeightRegular, fontSize: fontSizeH2);
static const h3SemiBold = TextStyle(fontWeight: fontWeightSemiBold, fontSize: fontSizeH3);
static const h3Regular = TextStyle(fontWeight: fontWeightRegular, fontSize: fontSizeH3);
static const h4SemiBold = TextStyle(fontWeight: fontWeightSemiBold, fontSize: fontSizeH4);
static const h4Regular = TextStyle(fontWeight: fontWeightRegular, fontSize: fontSizeH4);
static const h5SemiBold = TextStyle(fontWeight: fontWeightSemiBold, fontSize: fontSizeH5);
static const h5Regular = TextStyle(fontWeight: fontWeightRegular, fontSize: fontSizeH5);
}
| 0 |
mirrored_repositories/Flare/lib/core | mirrored_repositories/Flare/lib/core/style/app_theme.dart | import 'package:flutter/material.dart';
import 'package:flare/core/style/color_constants.dart';
import 'package:flare/core/style/styles.dart';
/// customize text theme for app theme
const TextTheme textTheme = TextTheme(
headline1: Styles.h1Regular,
headline2: Styles.h2Regular,
headline3: Styles.h3Regular,
headline4: Styles.h4Regular,
headline5: Styles.h5Regular,
);
/// Light theme - Light brightness
var themeLight = ThemeData(
brightness: Brightness.light,
primaryColor: ColorConstants.primary,
colorScheme: ColorScheme.fromSeed(
seedColor: ColorConstants.primary,
primary: ColorConstants.primary,
brightness: Brightness.light
),
textTheme: textTheme,
);
/// Dark theme - Dark brightness - For now set light brightness because we don't have dark theme design
var themeDark = ThemeData(
brightness: Brightness.dark,
primaryColor: ColorConstants.black,
colorScheme: ColorScheme.fromSeed(
seedColor: ColorConstants.primary,
primary: ColorConstants.primary,
brightness: Brightness.dark),
textTheme: textTheme);
/// Application Theme class which hold current application theme
/// @_themeData : Flutter theme data class hold the current theme
class AppTheme extends ChangeNotifier {
ThemeData _themeData;
AppTheme(this._themeData);
get getTheme => _themeData;
void setTheme(ThemeData theme) {
_themeData = theme;
notifyListeners();
}
ThemeData getThemeData() {
return _themeData;
}
}
| 0 |
mirrored_repositories/Flare/lib/core | mirrored_repositories/Flare/lib/core/style/color_constants.dart | import 'dart:ui';
///Constant file that hold all colors
class ColorConstants {
static const primary = Color(0xFF2A8AF7);
static const primaryPressed = Color(0xFF167FF7);
static const primaryAssent = Color(0xFF98C7FE);
static const secondary = Color(0xFF79242E);
static const transparent = Color(0x00000000);
static const black = Color(0xFF000000);
static const black80 = Color(0x80000000);
static const gray100 = Color(0xFF53565A);
static const gray50 = Color(0xFF97999B);
static const gray20 = Color(0xFFBBBCBC);
static const gray10 = Color(0xFFEEEEEE);
static const white = Color(0xFFFFFFFF);
static const fail = Color(0xFFB3261E);
static const fail10 = Color(0x1AB3261E);
static const success = Color(0xFF08875D);
}
| 0 |
mirrored_repositories/Flare | mirrored_repositories/Flare/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 values of widget properties are correct.
import 'package:flutter/material.dart';
import 'package:flutter_test/flutter_test.dart';
import 'package:flare/main.dart';
void main() {
testWidgets('Counter increments smoke test', (WidgetTester tester) async {
// Build our app and trigger a frame.
await tester.pumpWidget(MyApp());
// Verify that our counter starts at 0.
expect(find.text('0'), findsOneWidget);
expect(find.text('1'), findsNothing);
// Tap the '+' icon and trigger a frame.
await tester.tap(find.byIcon(Icons.add));
await tester.pump();
// Verify that our counter has incremented.
expect(find.text('0'), findsNothing);
expect(find.text('1'), findsOneWidget);
});
}
| 0 |
mirrored_repositories/Chi_Food | mirrored_repositories/Chi_Food/lib/config.dart |
const int APPBAR_SCROLL_OFFSET=100;
const String url='https://developers.zomato.com/api/v2.1';
const String RESTAURANT='/restaurant';
const String MENU='/dailymenu';
const String REVIEWS='/reviews';
const String CUSINES='/cuisines';
const String CATEGORY='/categories';
const String GEOLOCATION='/geocode';
const String ESTABLISHMENT='/establishments';
const String LOCATIONDETAIL='/location_details';
const String MENU_CATEGORY='https://www.themealdb.com/api/json/v1/1/list.php?c=list';
const String MENU_URL='https://www.themealdb.com/api/json/v1/1/filter.php?c=';
const String asset='assets/img/';
const String icon='assets/icon/';
final List<String> bannerList = <String>[
'assets/img/banner1.jpeg',
'assets/img/banner2.jpeg',
'assets/img/banner3.jpeg',
'assets/img/banner4.jpeg',
];
| 0 |
mirrored_repositories/Chi_Food | mirrored_repositories/Chi_Food/lib/main.dart | import 'package:chifood/bloc/authBloc/AuthBloc.dart';
import 'package:chifood/bloc/authBloc/AuthEvent.dart';
import 'package:chifood/bloc/blocDelegate.dart';
import 'package:chifood/bloc/implementation/FireAuthRepo.dart';
import 'package:chifood/bloc/implementation/RestaurantImplement.dart';
import 'package:chifood/bloc/implementation/SelectionImplement.dart';
import 'package:chifood/bloc/mealBloc/mealBloc.dart';
import 'package:chifood/bloc/myDio.dart';
import 'package:chifood/bloc/orderBloc/orderBloc.dart';
import 'package:chifood/bloc/restaurantBloc/restaurantBloc.dart';
import 'package:chifood/bloc/restaurantListBloc/restaurantListBloc.dart';
import 'package:chifood/bloc/selectionBloc/selectionBloc.dart';
import 'package:chifood/ui/pages/home.dart';
import 'package:chifood/ui/pages/mapSearch.dart';
import 'package:chifood/ui/pages/myPage.dart';
import 'package:chifood/ui/pages/order.dart';
import 'package:chifood/ui/pages/orderConfirmation.dart';
import 'package:chifood/ui/pages/orderFinish.dart';
import 'package:chifood/ui/pages/restaurantFilterPage.dart';
import 'package:chifood/ui/pages/restaurantScreen.dart';
import 'package:chifood/ui/pages/searchPage.dart';
import 'package:chifood/ui/pages/sign.dart';
import 'package:chifood/ui/pages/signUp.dart';
import 'package:chifood/ui/pages/splash.dart';
import 'package:chifood/ui/widgets/customDrawer.dart';
import 'package:cloud_firestore/cloud_firestore.dart';
import 'package:dio/dio.dart';
import 'package:firebase_auth/firebase_auth.dart';
import 'package:firebase_storage/firebase_storage.dart';
import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
import 'package:flutter_bloc/flutter_bloc.dart';
import 'package:oktoast/oktoast.dart';
import 'bloc/implementation/FilterRestaurantImplement.dart';
//void main(){
// WidgetsFlutterBinding.ensureInitialized();
// SystemChrome.setPreferredOrientations([DeviceOrientation.portraitUp]).then((_){
//
// });
//}
void main(){
BlocSupervisor.delegate=MyBlocDelegate();
runApp(MyApp());
}
class MyApp extends StatefulWidget {
@override
_MyAppState createState() => _MyAppState();
}
class _MyAppState extends State<MyApp> {
FirebaseAuth _firebaseAuth;
Firestore _firestore;
FireAuthRepo _fireAuthRepo;
SelectionImplement _selectionReop;
RestaurantImplement _restaurantImplement;
FilterRestaurant _filterRestaurantImp;
Dio client;
Dio yelpClient;
@override
void initState() {
// TODO: implement initState
super.initState();
_firebaseAuth=FirebaseAuth.instance;
_firestore=Firestore.instance;
_fireAuthRepo=FireAuthRepo(_firebaseAuth,_firestore);
client=getDio();
yelpClient=getYelpDio();
_selectionReop= SelectionImplement(client);
_restaurantImplement=RestaurantImplement(client,yelpClient);
_filterRestaurantImp=FilterRestaurant(client);
}
@override
Widget build(BuildContext context) {
return OKToast(
animationCurve: Curves.easeIn,
animationBuilder: Miui10AnimBuilder(),
animationDuration: Duration(milliseconds: 200),
duration: Duration(seconds: 3),
child: MultiBlocProvider(
providers: [
BlocProvider<AuthenticationBloc>(
create: (context){
return AuthenticationBloc(_fireAuthRepo)..add(VerifyAuth());
},
),
BlocProvider<SelectionBloc>(
create: (context){
return SelectionBloc(selectionRepo: _selectionReop,AuthBloc: BlocProvider.of<AuthenticationBloc>(context));
},
),
BlocProvider<RestaurantBloc>(
create: (context){
return RestaurantBloc(_restaurantImplement);
},
),
BlocProvider<MenuBloc>(
create: (context){
return MenuBloc();
},
),
BlocProvider<OrderBloc>(
create: (context){
return OrderBloc();
},
),
BlocProvider<RestaurantListBloc>(
create: (context){
return RestaurantListBloc(_filterRestaurantImp);
},
)
],
child: MaterialApp(
title: 'Flutter Demo',
debugShowCheckedModeBanner: false,
theme: ThemeData(
// This is the theme of your application.
//
// Try running your application with "flutter run". You'll see the
// application has a blue toolbar. Then, without quitting the app, try
// changing the primarySwatch below to Colors.green and then invoke
// "hot reload" (press "r" in the console where you ran "flutter run",
// or simply save your changes to "hot reload" in a Flutter IDE).
// Notice that the counter didn't reset back to zero; the application
// is not restarted.
primaryColor: Color(0xffffd31d)
),
home: SplashPage(_fireAuthRepo),
routes: <String,WidgetBuilder>{
'/HomePage':(BuildContext ctx)=> HomePage(),
'/OrderFinish':(BuildContext ctx)=>OrderFinish(),
'/OrderConfirm':(BuildContext ctx)=>OrderConfirmation(),
'/Order':(BuildContext ctx)=>CustomDrawer(),
'/setUp':(BuildContext ctx)=>SignScreen(),
'/SignUp':(BuildContext ctx)=>SignUpScreen(client),
'/MapSearch':(BuildContext ctx)=>MapSample(),
'/Restaurant':(BuildContext ctx)=>RestaurantScreen(),
'/Search':(BuildContext ctx)=>CustomSearchPage(client,yelpClient),
'/FilterRestaurants':(BuildContext ctx)=>RestaurantFilterPage(),
'/MyPage':(BuildContext ctx)=>MyPage()
},
),
),
);
}
}
| 0 |
mirrored_repositories/Chi_Food/lib | mirrored_repositories/Chi_Food/lib/bloc/myDio.dart | import 'package:chifood/configs.dart';
import 'package:dio/dio.dart';
Dio getDio(){
var dio =new Dio();
dio.interceptors.add(InterceptorsWrapper(
onRequest:(RequestOptions options) async {
var customHeaders = {
'content-type': 'application/json',
'user-key':ZOMATO
};
options.headers.addAll(customHeaders);
return options;
},
onResponse:(Response response) async {
return response; // continue
},
onError: (DioError e) async {
return e;//continue
}
));
return dio;
}
Dio getYelpDio(){
var dio =new Dio();
dio.interceptors.add(InterceptorsWrapper(
onRequest:(RequestOptions options) async {
var customHeaders = {
'Authorization':'Bearer $API_YELP'
};
options.headers.addAll(customHeaders);
return options;
},
));
return dio;
} | 0 |
mirrored_repositories/Chi_Food/lib | mirrored_repositories/Chi_Food/lib/bloc/dbPath.dart | class FirestorePaths{
static const ORDER='order';
static const USER='user';
static const REVIEW="review";
static String userPath(String uid){
return "$USER/$uid";
}
} | 0 |
mirrored_repositories/Chi_Food/lib | mirrored_repositories/Chi_Food/lib/bloc/blocDelegate.dart | import 'package:bloc/bloc.dart';
class MyBlocDelegate extends BlocDelegate {
@override
void onEvent(Bloc bloc, Object event) {
print(event);
super.onEvent(bloc, event);
}
@override
void onError(Bloc bloc, Object error, StackTrace stackTrace) {
print(error);
super.onError(bloc, error, stackTrace);
}
@override
void onTransition(Bloc bloc, Transition transition) {
print(transition);
super.onTransition(bloc, transition);
}
} | 0 |
mirrored_repositories/Chi_Food/lib/bloc | mirrored_repositories/Chi_Food/lib/bloc/implementation/FilterRestaurantImplement.dart | import 'package:chifood/bloc/base/baseFilterRestaurant.dart';
import 'package:chifood/model/restaurants.dart';
import 'package:chifood/model/serializer.dart';
import 'package:dio/dio.dart';
class FilterRestaurant extends BaseFilterRestaurant {
Dio client;
FilterRestaurant(this.client);
@override
Future<List<Restaurants>> getFilteredRestaurant(
{String entity_id,
String entity_type,
String lat,
String lon,
String cuisines,
String radius,
String category}) async {
try{
Response res = await client.get<dynamic>(
'https://developers.zomato.com/api/v2.1/search?'+
'${entity_id == null ? '' : 'entity_id=$entity_id}'}'
+'&${entity_type == null ? '' : 'entity_type=$entity_type}'}&lat=$lat&lon=$lon&${radius == null?'':'radius=$radius'}'
'&${cuisines==null?'':'cuisines=$cuisines'}'+'&${category==null?'':'category=$category'}',
);
List<Restaurants> result = res.data['restaurants'].map<Restaurants>((each) {
return standardSerializers.deserializeWith(
Restaurants.serializer, each['restaurant']);
}).toList();
return result;
}catch(e){
print(e);
}
}
}
| 0 |
mirrored_repositories/Chi_Food/lib/bloc | mirrored_repositories/Chi_Food/lib/bloc/implementation/SelectionImplement.dart |
import 'package:built_collection/built_collection.dart';
import 'package:built_value/serializer.dart';
import 'package:chifood/bloc/base/baseCategory.dart';
import 'package:chifood/model/category.dart';
import 'package:chifood/model/cuisine.dart';
import 'package:chifood/model/establishment.dart';
import 'package:chifood/model/geoLocation.dart';
import 'package:chifood/model/location.dart';
import 'package:chifood/model/locationDetail.dart';
import 'package:chifood/model/locationLocation.dart';
import 'package:chifood/model/popularity.dart';
import 'package:chifood/model/restaurants.dart';
import 'package:chifood/model/serializer.dart';
import 'package:dio/dio.dart';
import '../../config.dart';
class SelectionImplement extends BaseSelection{
Dio client;
SelectionImplement(this.client);
@override
Future<List<Category>> getCategories() async {
final Response res= await client.get<dynamic>('$url$CATEGORY');
return res.data['categories'].map<Category>((dynamic each){
return standardSerializers.deserializeWith(Category.serializer, each['categories']);
}).toList();
}
@override
Future<GeoLocation> getGeoLocation({String lat,String lon}) async {
//Response res=await client.get('$url$GEOLOCATION',queryParameters: {'lat':lat,'long':lon});
Response res=await client.get<dynamic>('https://developers.zomato.com/api/v2.1/geocode?lat=$lat&lon=$lon');
GeoLocation result=GeoLocation((a)=>a
..popularity=standardSerializers.deserializeWith(Popularity.serializer, res.data['popularity']).toBuilder()
..location=standardSerializers.deserializeWith(LocationLocation.serializer, res.data['location']).toBuilder()
..nearby_restaurants=ListBuilder(res.data['nearby_restaurants'].map<Restaurants>((dynamic each){
return standardSerializers.deserializeWith(Restaurants.serializer, each['restaurant']);
}).toList())
);
return result;
}
@override
Future<List<Restaurants>> getLocationDetail({String entity_id,String entity_type}) async{
Response res=await client.get<dynamic>('$url$LOCATIONDETAIL',queryParameters: <String,dynamic>{'entity_id':entity_id,'entity_type':entity_type});
return res.data['best_rated_restaurant'].map<Restaurants>((dynamic each){
return standardSerializers.deserializeWith(Restaurants.serializer, each['restaurant']);
}).toList();
}
@override
Future<List<Cuisine>> getCuisines({int city_id, String lat, String lon})async {
Response res;
if(lat!=null&&lon!=null){
res= await client.get<dynamic>('$url$CUSINES',queryParameters: <String,dynamic>{"city_id":city_id,'lat':lat,'lon':lon});
}else{
res= await client.get<dynamic>('$url$CUSINES',queryParameters: <String,dynamic>{"city_id":city_id,});
}
return res.data['cuisines'].map<Cuisine>((dynamic each){
return standardSerializers.deserializeWith(Cuisine.serializer, each['cuisine']);
}).toList();
}
@override
Future<List<Establishment>> getEstablishments({int city_id, String lat, String lon}) async {
Response res= await client.get<dynamic>('$url$ESTABLISHMENT',queryParameters: <String,dynamic>{"city_id":city_id,'lat':lat,'lon':lon});
List<Establishment> result= res.data['establishments'].map<Establishment>((dynamic each){
Establishment content= standardSerializers.deserializeWith(Establishment.serializer, each['establishment']);
return content;
}).toList();
return result;
}
} | 0 |
mirrored_repositories/Chi_Food/lib/bloc | mirrored_repositories/Chi_Food/lib/bloc/implementation/RestaurantImplement.dart |
import 'package:chifood/bloc/base/baseRestaurant.dart';
import 'package:chifood/config.dart';
import 'package:chifood/model/dailyMenu.dart';
import 'package:chifood/model/restaurants.dart';
import 'package:chifood/model/review.dart';
import 'package:chifood/model/serializer.dart';
import 'package:chifood/model/yelpBusiness.dart';
import 'package:chifood/model/yelpReview.dart';
import 'package:dio/dio.dart';
class RestaurantImplement extends BaseRestaurant {
final Dio client;
final Dio yelpClient;
RestaurantImplement(this.client,this.yelpClient);
@override
Future<DailyMenu> fetchDailyMenu({String res_id}) async {
final Response res= await client.get<Response>('$url$RESTAURANT',queryParameters: <String,dynamic>{'res_id':res_id});
return res.data;
}
@override
Future<Restaurants> fetchRestaurant({String res_id}) async {
final Response res= await client.get<Response>('$url$RESTAURANT',queryParameters:<String,dynamic>{'res_id':res_id} );
return standardSerializers.deserializeWith(Restaurants.serializer, res.data);
}
@override
Future<List<Review>> fetchReviews({int start=5, int count=20, String res_id}) async {
final Response res= await client.get<Response>('$url$REVIEWS',queryParameters:<String,dynamic>{'start':start,'count':count,'res_id':res_id});
return res.data['user_reviews'].map<Review>((Map<String,dynamic>each){
return standardSerializers.deserializeWith(Review.serializer, each['review']);
}).toList();
}
@override
Future<YelpBusiness> getYelpBusiness({String term, String location, String locale, String latitude, String longitude}) async{
Response res=await yelpClient.get<Response>('https://api.yelp.com/v3/businesses/search',queryParameters: <String,dynamic>{
'term':term,'location':location,'latitude':latitude,'longitude':longitude
});
return standardSerializers.deserializeWith(YelpBusiness.serializer, res.data['businesses'][0]);
}
@override
Future<List<YelpReview>> getYelpBusinessReview({String id})async {
Response res=await yelpClient.get<Response>('https://api.yelp.com/v3/businesses/$id/reviews');
return res.data['reviews'].map<YelpReview>((Map<String,dynamic> each){
return standardSerializers.deserializeWith(YelpReview.serializer, each);
}).toList();
}
} | 0 |
mirrored_repositories/Chi_Food/lib/bloc | mirrored_repositories/Chi_Food/lib/bloc/implementation/FireAuthRepo.dart |
import 'package:built_value/serializer.dart';
import 'package:chifood/bloc/base/FireAuth.dart';
import 'package:chifood/model/baseUser.dart';
import 'package:chifood/model/serializer.dart';
import 'package:cloud_firestore/cloud_firestore.dart';
import 'package:firebase_auth/firebase_auth.dart';
import '../dbPath.dart';
class FireAuthRepo implements FireAuth{
final FirebaseAuth _firebaseAuth;
final Firestore _fireStore;
static const UID="uid";
static const USERNAME="username";
static const GENDER="gender";
static const FOODIE="foodie_level";
static const PHOTO="photoUrl";
static const COLOR="foodie_color";
static const Location="primaryLocation";
FireAuthRepo(this._firebaseAuth, this._fireStore);
@override
Future<BaseUser> isAuthenticated() {
return _firebaseAuth.onAuthStateChanged.asyncMap((firebaseUser) {
return _fromFirebaseUser(firebaseUser);
}).elementAt(0);
}
@override
Future<void> logOut(){
return _firebaseAuth.signOut();
}
Future<BaseUser> login(String email, String password) async {
final firebaseUser = await _firebaseAuth.signInWithEmailAndPassword(
email: email, password: password);
if(firebaseUser==null){
return null;
}
return await _fromFirebaseUser(firebaseUser.user);
}
Future<BaseUser> signUp(String email,String password,BaseUser userinfo) async {
final firebaseUser=await _firebaseAuth.createUserWithEmailAndPassword(email: email.trim(), password: password);
return await _fromFirebaseUser(firebaseUser.user,userInfo: userinfo);
}
Stream<BaseUser> getAuthenticationStateChange() {
return _firebaseAuth.onAuthStateChanged.asyncMap((firebaseUser) {
return _fromFirebaseUser(firebaseUser);
});
}
Future<BaseUser> getUser() async{
final user=await _firebaseAuth.currentUser();
return _fromFirebaseUser(user);
}
Future<BaseUser> _fromFirebaseUser(FirebaseUser firebaseUser,{BaseUser userInfo}) async {
if (firebaseUser == null) return Future.value(null);
final documentReference =
_fireStore.document(FirestorePaths.userPath(firebaseUser.uid));
final snapshot = await documentReference.get();
BaseUser user;
if (snapshot.data==null||snapshot.data.length == 0) {
final a=standardSerializers.serializeWith(BaseUser.serializer,userInfo.rebuild((a)=>a ..uid=firebaseUser.uid));
await documentReference.setData(a);
user=userInfo;
} else {
user = standardSerializers.deserializeWith(BaseUser.serializer,snapshot.data);
}
return user;
}
} | 0 |
mirrored_repositories/Chi_Food/lib/bloc | mirrored_repositories/Chi_Food/lib/bloc/authBloc/AuthBloc.dart |
import 'dart:async';
import 'package:bloc/bloc.dart';
import 'package:chifood/bloc/authBloc/AuthEvent.dart';
import 'package:chifood/bloc/authBloc/AuthState.dart';
import 'package:chifood/bloc/implementation/FireAuthRepo.dart';
import 'package:chifood/model/baseUser.dart';
class AuthenticationBloc extends Bloc<AuthenticationEvent,AuthenticationState>{
FireAuthRepo authRepo;
AuthenticationBloc(this.authRepo);
@override
// TODO: implement initialState
AuthenticationState get initialState => Uninitialized();
@override
Stream<AuthenticationState> mapEventToState(AuthenticationEvent event) async* {
// TODO: implement mapEventToState
if(event is VerifyAuth){
yield* _mapVerifyToState();
} else if( event is LoginEvent){
yield* _mapLoginToState(event);
} else if( event is SignUpEvent){
yield* _mapSignUpToState(event);
}
}
Stream<AuthenticationState> _mapVerifyToState() async*{
BaseUser user;
user= await authRepo.isAuthenticated();
if(user==null){
yield Unauthenticated();
}else{
yield Authenticated(user);
}
}
Stream<AuthenticationState> _mapLoginToState(LoginEvent event) async*{
final user= await authRepo.login(event.username, event.password);
if(user==null){
yield FailAuthenticated();
}else{
yield Authenticated(user);
}
}
Stream<AuthenticationState> _mapSignUpToState(SignUpEvent event) async*{
final user= await authRepo.signUp(event.email, event.password,event.userInfo);
if(user==null){
yield FailAuthenticated();
}else{
yield Authenticated(user);
}
}
} | 0 |
mirrored_repositories/Chi_Food/lib/bloc | mirrored_repositories/Chi_Food/lib/bloc/authBloc/AuthEvent.dart |
import 'package:chifood/model/baseUser.dart';
import 'package:equatable/equatable.dart';
abstract class AuthenticationEvent extends Equatable {
@override
List<Object> get props => [];
}
class VerifyAuth extends AuthenticationEvent{
@override
List<Object> get props => [];
}
class LoginEvent extends AuthenticationEvent{
String username;
String password;
LoginEvent(this.username, this.password);
}
class SignUpEvent extends AuthenticationEvent{
BaseUser userInfo;
String password;
String email;
SignUpEvent({this.userInfo, this.password, this.email});
@override
// TODO: implement props
List<Object> get props => null;
}
| 0 |
mirrored_repositories/Chi_Food/lib/bloc | mirrored_repositories/Chi_Food/lib/bloc/authBloc/AuthState.dart | import 'package:chifood/model/baseUser.dart';
import 'package:equatable/equatable.dart';
abstract class AuthenticationState extends Equatable {
const AuthenticationState();
@override
List<Object> get props => [];
}
class Uninitialized extends AuthenticationState {}
class Authenticated extends AuthenticationState {
final BaseUser user;
const Authenticated(this.user);
@override
List<Object> get props => [user];
}
class Authenticating extends AuthenticationState{}
class FailAuthenticated extends AuthenticationState{}
class Unauthenticated extends AuthenticationState {} | 0 |
mirrored_repositories/Chi_Food/lib/bloc | mirrored_repositories/Chi_Food/lib/bloc/userBloc/userState.dart | import 'package:chifood/model/baseUser.dart';
import 'package:equatable/equatable.dart';
abstract class UserState extends Equatable{
const UserState();
@override
List<Object> get props => [];
}
class LoadedUserState extends UserState{
BaseUser curUser;
LoadedUserState(this.curUser);
@override
List<Object> get props=>[curUser];
}
class LoadUserFail extends UserState{
}
class LoadingUserState extends UserState{} | 0 |
mirrored_repositories/Chi_Food/lib/bloc | mirrored_repositories/Chi_Food/lib/bloc/mealBloc/mealBloc.dart |
import 'dart:async';
import 'package:chifood/bloc/mealBloc/menuEvent.dart';
import 'package:chifood/bloc/mealBloc/menuState.dart';
import 'package:chifood/config.dart';
import 'package:chifood/model/menuCategory.dart';
import 'package:chifood/model/menuItem.dart';
import 'package:chifood/model/serializer.dart';
import 'package:dio/dio.dart';
import 'package:flutter_bloc/flutter_bloc.dart';
class MenuBloc extends Bloc<MenuEvent,MenuState> {
Dio myDio=Dio();
@override
MenuState get initialState => LoadingMenuState();
@override
Stream<MenuState> mapEventToState(MenuEvent event) async* {
if(event is LoadMenuEvent){
yield* _mapLoadMenuToState(event);
}
}
Stream<MenuState> _mapLoadMenuToState(LoadMenuEvent event) async*{
try{
List<List<MenuItem>> menuItem=<List<MenuItem>>[];
Response response=await myDio.get<dynamic>(MENU_CATEGORY);
List<MenuCategory> result= response.data['meals'].map<MenuCategory>((dynamic each) {
return standardSerializers.deserializeWith(MenuCategory.serializer, each);
}).toList();
await Future.forEach(result, (MenuCategory data)async{
menuItem.add(await getItemList(data.strCategory)) ;
});
yield LoadMenuState(menuItem,result);
}catch(e){
print(e);
yield LoadMenuFail();
}
}
Future<List<MenuItem>> getItemList(String item) async{
Response res=await myDio.get<dynamic>('$MENU_URL$item');
return res.data['meals'].map<MenuItem>((dynamic each){
return standardSerializers.deserializeWith(MenuItem.serializer, each);
}).toList();
}
} | 0 |
mirrored_repositories/Chi_Food/lib/bloc | mirrored_repositories/Chi_Food/lib/bloc/mealBloc/menuState.dart | import 'package:chifood/model/menuCategory.dart';
import 'package:chifood/model/menuItem.dart';
import 'package:equatable/equatable.dart';
import 'package:flutter/cupertino.dart';
@immutable
abstract class MenuState extends Equatable{
const MenuState();
@override
List<Object> get props =><Object>[];
}
class LoadingMenuState extends MenuState{
}
@immutable
class LoadMenuState extends MenuState{
const LoadMenuState(this.menuList,this.menuCategory);
final List<List<MenuItem>> menuList;
final List<MenuCategory> menuCategory;
@override
List<Object> get props=><Object>[menuList];
}
class LoadMenuFail extends MenuState{}
| 0 |
mirrored_repositories/Chi_Food/lib/bloc | mirrored_repositories/Chi_Food/lib/bloc/mealBloc/menuEvent.dart |
import 'package:equatable/equatable.dart';
abstract class MenuEvent extends Equatable{
MenuEvent();
@override
List<Object> get props => [];
}
class LoadMenuEvent extends MenuEvent{
LoadMenuEvent();
} | 0 |
mirrored_repositories/Chi_Food/lib/bloc | mirrored_repositories/Chi_Food/lib/bloc/selectionBloc/selectionBloc.dart |
import 'dart:async';
import 'package:bloc/bloc.dart';
import 'package:chifood/bloc/authBloc/AuthBloc.dart';
import 'package:chifood/bloc/implementation/SelectionImplement.dart';
import 'package:chifood/bloc/selectionBloc/selectionEvent.dart';
import 'package:chifood/bloc/selectionBloc/selectionState.dart';
import 'package:chifood/model/category.dart';
import 'package:chifood/model/cuisine.dart';
import 'package:chifood/model/establishment.dart';
import 'package:chifood/model/geoLocation.dart';
import 'package:chifood/model/locationDetail.dart';
import 'package:chifood/model/restaurants.dart';
import 'package:flutter/cupertino.dart';
class SelectionBloc extends Bloc<SelectionEvent,SelectionState>{
SelectionBloc({@required this.selectionRepo,this.AuthBloc}){
// authSubscription=AuthBloc.listen((state){
//
// if(state is Authenticated){
// add(LoadAllBaseChoice(city_id: state.user.cityId,lon: state.user.long,lat: state.user.lat));
// }
// });
}
final SelectionImplement selectionRepo;
final AuthenticationBloc AuthBloc;
StreamSubscription<dynamic> authSubscription;
@override
SelectionState get initialState => LoadingSelectionState();
@override
Stream<SelectionState> mapEventToState(SelectionEvent event) async*{
if(event is LoadAllBaseChoice){
yield* _mapLoadAllToState(event);
}
}
@override
Future<void> close() {
authSubscription.cancel();
return super.close();
}
Stream<SelectionState> _mapLoadAllToState(LoadAllBaseChoice data) async*{
try{
final List<Establishment> establishment= await selectionRepo.getEstablishments(city_id: data.city_id,lat:data.lat,lon:data.lon);
final GeoLocation geoLocation=await selectionRepo.getGeoLocation(lat: data.lat,lon: data.lon);
final List<Category> categoryList= await selectionRepo.getCategories();
final List<Cuisine> cuisineList= await selectionRepo.getCuisines(city_id: data.city_id,lat:data.lat,lon:data.lon);
final List<Restaurants> locationDetail=await selectionRepo.getLocationDetail(entity_id: data.entity_id,entity_type: data.entity_type);
yield BaseChoice(establishment,categoryList,geoLocation,cuisineList,locationDetail);
}catch(e){
print(e);
yield SelectionLoadFailState();
}
}
} | 0 |
mirrored_repositories/Chi_Food/lib/bloc | mirrored_repositories/Chi_Food/lib/bloc/selectionBloc/selectionEvent.dart |
import 'package:chifood/model/baseUser.dart';
import 'package:equatable/equatable.dart';
import 'package:flutter/cupertino.dart';
abstract class SelectionEvent extends Equatable {
const SelectionEvent();
@override
List<Object> get props => [];
}
class LoadingSelection extends SelectionEvent{}
class LoadSelectionSuccess extends SelectionEvent{}
class LoadCategory extends SelectionEvent{
}
class LoadGeoInfo extends SelectionEvent{
final double lat;
final double lon;
LoadGeoInfo(this.lat, this.lon);
}
class LoadCusines extends SelectionEvent{
final int city_id;
final double lat;
final double lon;
LoadCusines({@required this.city_id, this.lat, this.lon});
}
class LoadAllBaseChoice extends SelectionEvent{
final int city_id;
final String lat;
final String lon;
final String entity_id;
final String entity_type;
LoadAllBaseChoice({this.city_id, this.lat, this.lon,this.entity_type,this.entity_id});
}
class LoadEstablishment extends SelectionEvent{
final int city_id;
final double lat;
final double lon;
LoadEstablishment({@required this.city_id, this.lat, this.lon});
}
class LoadSelectionFail extends SelectionEvent{}
| 0 |
mirrored_repositories/Chi_Food/lib/bloc | mirrored_repositories/Chi_Food/lib/bloc/selectionBloc/selectionState.dart |
import 'package:chifood/model/category.dart';
import 'package:chifood/model/cuisine.dart';
import 'package:chifood/model/establishment.dart';
import 'package:chifood/model/geoLocation.dart';
import 'package:chifood/model/locationDetail.dart';
import 'package:chifood/model/restaurants.dart';
import 'package:equatable/equatable.dart';
abstract class SelectionState extends Equatable {
const SelectionState();
@override
List<Object> get props => [];
}
class LoadingSelectionState extends SelectionState{}
class BaseChoice extends SelectionState{
final List<Establishment> establishmentList;
final List<Category> categoryList;
final GeoLocation geoLocation;
final List<Cuisine> cuisineList;
final List<Restaurants> locationDetail;
BaseChoice(this.establishmentList, this.categoryList, this.geoLocation,
this.cuisineList,this.locationDetail);
@override
List<Object> get props => [establishmentList,categoryList,cuisineList,categoryList,locationDetail];
}
class SelectionLoadFailState extends SelectionState{} | 0 |
mirrored_repositories/Chi_Food/lib/bloc | mirrored_repositories/Chi_Food/lib/bloc/orderBloc/orderBloc.dart |
import 'package:bloc/bloc.dart';
import 'package:chifood/bloc/orderBloc/orderEvent.dart';
import 'package:chifood/bloc/orderBloc/orderState.dart';
import 'package:chifood/model/orderItem.dart';
class OrderBloc extends Bloc<OrderEvent,OrderState>{
@override
// TODO: implement initialState
OrderState get initialState => NoOrderState();
@override
Stream<OrderState> mapEventToState(OrderEvent event) async*{
// TODO: implement mapEventToState
yield* _mapOrderEventToState(event);
}
Stream <OrderState> _mapOrderEventToState(OrderEvent event)async* {
yield OrderLoadingState();
if (event is AddRemoveOrderEvent) {
yield OrderListState(event.item);
}
}
}
| 0 |
mirrored_repositories/Chi_Food/lib/bloc | mirrored_repositories/Chi_Food/lib/bloc/orderBloc/orderState.dart |
import 'package:chifood/model/orderItem.dart';
import 'package:equatable/equatable.dart';
abstract class OrderState extends Equatable{
@override
List<Object> get props =><Object>[];
OrderState();
}
class OrderListState extends OrderState{
List<List<OrderItem>> orderList;
OrderListState(this.orderList);
@override
List<Object> get props =>[orderList];
}
class OrderLoadingState extends OrderState{
OrderLoadingState();
}
class NoOrderState extends OrderState{
NoOrderState();
} | 0 |
mirrored_repositories/Chi_Food/lib/bloc | mirrored_repositories/Chi_Food/lib/bloc/orderBloc/orderEvent.dart |
import 'package:chifood/model/orderItem.dart';
import 'package:equatable/equatable.dart';
abstract class OrderEvent extends Equatable{
OrderEvent();
@override
List<Object> get props => [];
}
class AddRemoveOrderEvent extends OrderEvent{
List<List<OrderItem>> item;
AddRemoveOrderEvent(this.item);
}
| 0 |
mirrored_repositories/Chi_Food/lib/bloc | mirrored_repositories/Chi_Food/lib/bloc/restaurantListBloc/restaurantListEvent.dart |
import 'package:equatable/equatable.dart';
abstract class RestaurantListEvent extends Equatable{
RestaurantListEvent();
}
class BaseRestaurantListEvent extends RestaurantListEvent{
String lat;
String long;
BaseRestaurantListEvent({this.lat, this.long});
@override
// TODO: implement props
List<Object> get props => null;
}
class FilterRestaurantListEvent extends RestaurantListEvent{
String entity_id;
String entity_type;
String lat;
String lon;
String cuisines;
String radius;
String category;
FilterRestaurantListEvent({this.entity_id, this.entity_type, this.lat,
this.lon, this.cuisines, this.radius, this.category});
@override
// TODO: implement props
List<Object> get props => null;
} | 0 |
mirrored_repositories/Chi_Food/lib/bloc | mirrored_repositories/Chi_Food/lib/bloc/restaurantListBloc/restaurantListBloc.dart |
import 'package:bloc/bloc.dart';
import 'package:chifood/bloc/implementation/FilterRestaurantImplement.dart';
import 'package:chifood/bloc/restaurantListBloc/restaurantListEvent.dart';
import 'package:chifood/bloc/restaurantListBloc/restaurantListState.dart';
import 'package:chifood/model/restaurants.dart';
class RestaurantListBloc extends Bloc<RestaurantListEvent,RestaurantListState>{
FilterRestaurant filterRestaurantRepo;
RestaurantListBloc(this.filterRestaurantRepo);
@override
// TODO: implement initialState
RestaurantListState get initialState => NoRestaurantListState();
@override
Stream<RestaurantListState> mapEventToState(RestaurantListEvent event) async*{
// TODO: implement mapEventToState
if(event is FilterRestaurantListEvent){
yield* _mapFilterChoiceToState(event);
}
}
Stream<RestaurantListState> _mapFilterChoiceToState(FilterRestaurantListEvent event) async*{
yield LoadingRestaurantListState();
try{
List<Restaurants> res=await filterRestaurantRepo.getFilteredRestaurant(entity_type: event?.entity_type,entity_id: event?.entity_type,
category: event?.category,cuisines: event?.category,lon: event?.lon,lat: event?.lat);
yield LoadedFilterRestaurantListState(res);
}catch(e){
yield LoadFailRestaurantListState();
}
}
} | 0 |
mirrored_repositories/Chi_Food/lib/bloc | mirrored_repositories/Chi_Food/lib/bloc/restaurantListBloc/restaurantListState.dart |
import 'package:chifood/model/restaurants.dart';
import 'package:equatable/equatable.dart';
abstract class RestaurantListState extends Equatable{
RestaurantListState();
}
class LoadingRestaurantListState extends RestaurantListState{
@override
// TODO: implement props
List<Object> get props => null;
LoadingRestaurantListState();
}
class LoadFailRestaurantListState extends RestaurantListState{
LoadFailRestaurantListState();
@override
// TODO: implement props
List<Object> get props => null;
}
class LoadedFilterRestaurantListState extends RestaurantListState{
final List<Restaurants> restaurantList;
LoadedFilterRestaurantListState(this.restaurantList);
@override
// TODO: implement props
List<Object> get props => [restaurantList];
}
class NoRestaurantListState extends RestaurantListState{
@override
// TODO: implement props
List<Object> get props => null;
} | 0 |
mirrored_repositories/Chi_Food/lib/bloc | mirrored_repositories/Chi_Food/lib/bloc/base/baseRestaurant.dart | import 'dart:async';
import 'package:chifood/model/dailyMenu.dart';
import 'package:chifood/model/restaurants.dart';
import 'package:chifood/model/review.dart';
import 'package:chifood/model/yelpBusiness.dart';
import 'package:chifood/model/yelpReview.dart';
import 'package:dio/dio.dart';
import 'package:flutter/cupertino.dart';
abstract class BaseRestaurant{
Future<Restaurants> fetchRestaurant({@required String res_id});
Future<DailyMenu> fetchDailyMenu({@required String res_id});
Future<List<Review>> fetchReviews( {int start,int count,@required String res_id});
Future<List<YelpReview>> getYelpBusinessReview({String id});
Future<YelpBusiness> getYelpBusiness({String term,String location,String locale,String latitude,String longitude});
} | 0 |
mirrored_repositories/Chi_Food/lib/bloc | mirrored_repositories/Chi_Food/lib/bloc/base/FireAuth.dart | import 'package:chifood/model/baseUser.dart';
abstract class FireAuth{
Future<void> logOut();
Future<BaseUser> login(String email,String password);
Future<BaseUser> signUp(String email,String password,BaseUser userInfo);
Future<BaseUser> isAuthenticated();
Future<BaseUser> getUser();
} | 0 |
mirrored_repositories/Chi_Food/lib/bloc | mirrored_repositories/Chi_Food/lib/bloc/base/baseCategory.dart | import 'package:chifood/model/category.dart';
import 'package:chifood/model/cuisine.dart';
import 'package:chifood/model/dailyMenu.dart';
import 'package:chifood/model/establishment.dart';
import 'package:chifood/model/geoLocation.dart';
import 'package:chifood/model/locationDetail.dart';
import 'package:chifood/model/restaurants.dart';
import 'package:flutter/cupertino.dart';
abstract class BaseSelection{
Future<List<Category>> getCategories();
Future<List<Cuisine>> getCuisines({@required int city_id,String lat,String lon});
Future<List<Establishment>> getEstablishments({@required int city_id,String lat,String lon});
Future<GeoLocation> getGeoLocation({@required String lat,@required String lon});
Future<List<Restaurants>> getLocationDetail({@required String entity_id,@required String entity_type});
} | 0 |
mirrored_repositories/Chi_Food/lib/bloc | mirrored_repositories/Chi_Food/lib/bloc/base/baseFilterRestaurant.dart |
import 'package:chifood/model/restaurants.dart';
abstract class BaseFilterRestaurant{
Future<List<Restaurants>> getFilteredRestaurant({String entity_id,
String entity_type,
String lat,
String lon,
String cuisines,
String radius,
String category});
} | 0 |
mirrored_repositories/Chi_Food/lib/bloc | mirrored_repositories/Chi_Food/lib/bloc/restaurantBloc/restaurantEvent.dart | import 'package:chifood/model/restaurants.dart';
import 'package:equatable/equatable.dart';
abstract class RestaurantEvent extends Equatable {
RestaurantEvent();
@override
List<Object> get props => [];
}
class LoadRestaurantAllInfoEvent extends RestaurantEvent {
final Restaurants res;
LoadRestaurantAllInfoEvent(this.res);
}
class LoadReviews extends RestaurantEvent {
final String res_id;
LoadReviews(this.res_id);
}
class LoadYelpReview extends RestaurantEvent {
final String id;
LoadYelpReview(this.id);
}
class LoadYelpBusiness extends RestaurantEvent {
String term;
String location;
String locale;
double latitude;
double longitude;
LoadYelpBusiness(this.term, this.location, this.locale, this.latitude,
this.longitude);
}
| 0 |
mirrored_repositories/Chi_Food/lib/bloc | mirrored_repositories/Chi_Food/lib/bloc/restaurantBloc/restaurantBloc.dart |
import 'package:bloc/bloc.dart';
import 'package:chifood/bloc/implementation/RestaurantImplement.dart';
import 'package:chifood/bloc/restaurantBloc/restaurantEvent.dart';
import 'package:chifood/bloc/restaurantBloc/restaurantState.dart';
import 'package:chifood/model/dailyMenu.dart';
import 'package:chifood/model/restaurants.dart';
import 'package:chifood/model/review.dart';
import 'package:chifood/model/yelpBusiness.dart';
import 'package:chifood/model/yelpReview.dart';
class RestaurantBloc extends Bloc<RestaurantEvent,RestaurantState>{
final RestaurantImplement restaurantImplement;
RestaurantBloc(this.restaurantImplement);
@override
// TODO: implement initialState
RestaurantState get initialState => LoadingRestaurantInfoState();
@override
Stream<RestaurantState> mapEventToState(RestaurantEvent event) async* {
if(event is LoadRestaurantAllInfoEvent){
yield* _mapRestaurantInfoToState(event);
}
}
Stream<RestaurantState> _mapRestaurantInfoToState(LoadRestaurantAllInfoEvent event) async*{
try{
final Restaurants res=event.res;
List<Review> reviewList=await restaurantImplement.fetchReviews(res_id: res.id);
DailyMenu menu=await restaurantImplement.fetchDailyMenu(res_id: res.id);
Restaurants restaurant=await restaurantImplement.fetchRestaurant(res_id: res.id);
YelpBusiness business=await restaurantImplement.getYelpBusiness(term: res.name,
location: res.location.locality,latitude: res.location.latitude,longitude: res.location.longitude);
List<YelpReview> yelpReviewList=await restaurantImplement.getYelpBusinessReview(id: business.id);
yield LoadedRestaurantInfoState(restaurant: restaurant,reviewList: reviewList,menu: menu,business: business,yelpReivwList: yelpReviewList);
}catch(_){
LoadFailRestaurantState();
}
}
} | 0 |
mirrored_repositories/Chi_Food/lib/bloc | mirrored_repositories/Chi_Food/lib/bloc/restaurantBloc/restaurantState.dart |
import 'package:chifood/model/dailyMenu.dart';
import 'package:chifood/model/restaurants.dart';
import 'package:chifood/model/review.dart';
import 'package:chifood/model/yelpBusiness.dart';
import 'package:chifood/model/yelpReview.dart';
import 'package:equatable/equatable.dart';
abstract class RestaurantState extends Equatable{
RestaurantState();
@override
List<Object> get props => [];
}
class LoadedRestaurantInfoState extends RestaurantState{
LoadedRestaurantInfoState({this.reviewList, this.menu, this.restaurant,this.business,this.yelpReivwList});
List<Review> reviewList;
DailyMenu menu;
Restaurants restaurant;
YelpBusiness business;
List<YelpReview> yelpReivwList;
@override
List<Object> get props=>[reviewList,menu,restaurant,business,yelpReivwList];
}
class LoadingRestaurantInfoState extends RestaurantState{}
class LoadFailRestaurantState extends RestaurantState{} | 0 |
mirrored_repositories/Chi_Food/lib | mirrored_repositories/Chi_Food/lib/model/yelpReview.g.dart | // GENERATED CODE - DO NOT MODIFY BY HAND
part of 'yelpReview.dart';
// **************************************************************************
// BuiltValueGenerator
// **************************************************************************
Serializer<YelpReview> _$yelpReviewSerializer = new _$YelpReviewSerializer();
class _$YelpReviewSerializer implements StructuredSerializer<YelpReview> {
@override
final Iterable<Type> types = const [YelpReview, _$YelpReview];
@override
final String wireName = 'YelpReview';
@override
Iterable<Object> serialize(Serializers serializers, YelpReview object,
{FullType specifiedType = FullType.unspecified}) {
final result = <Object>[
'id',
serializers.serialize(object.id, specifiedType: const FullType(String)),
'user',
serializers.serialize(object.user,
specifiedType: const FullType(YelpUser)),
'text',
serializers.serialize(object.text, specifiedType: const FullType(String)),
'time_created',
serializers.serialize(object.time_created,
specifiedType: const FullType(String)),
];
return result;
}
@override
YelpReview deserialize(Serializers serializers, Iterable<Object> serialized,
{FullType specifiedType = FullType.unspecified}) {
final result = new YelpReviewBuilder();
final iterator = serialized.iterator;
while (iterator.moveNext()) {
final key = iterator.current as String;
iterator.moveNext();
final dynamic value = iterator.current;
switch (key) {
case 'id':
result.id = serializers.deserialize(value,
specifiedType: const FullType(String)) as String;
break;
case 'user':
result.user.replace(serializers.deserialize(value,
specifiedType: const FullType(YelpUser)) as YelpUser);
break;
case 'text':
result.text = serializers.deserialize(value,
specifiedType: const FullType(String)) as String;
break;
case 'time_created':
result.time_created = serializers.deserialize(value,
specifiedType: const FullType(String)) as String;
break;
}
}
return result.build();
}
}
class _$YelpReview extends YelpReview {
@override
final String id;
@override
final YelpUser user;
@override
final String text;
@override
final String time_created;
factory _$YelpReview([void Function(YelpReviewBuilder) updates]) =>
(new YelpReviewBuilder()..update(updates)).build();
_$YelpReview._({this.id, this.user, this.text, this.time_created})
: super._() {
if (id == null) {
throw new BuiltValueNullFieldError('YelpReview', 'id');
}
if (user == null) {
throw new BuiltValueNullFieldError('YelpReview', 'user');
}
if (text == null) {
throw new BuiltValueNullFieldError('YelpReview', 'text');
}
if (time_created == null) {
throw new BuiltValueNullFieldError('YelpReview', 'time_created');
}
}
@override
YelpReview rebuild(void Function(YelpReviewBuilder) updates) =>
(toBuilder()..update(updates)).build();
@override
YelpReviewBuilder toBuilder() => new YelpReviewBuilder()..replace(this);
@override
bool operator ==(Object other) {
if (identical(other, this)) return true;
return other is YelpReview &&
id == other.id &&
user == other.user &&
text == other.text &&
time_created == other.time_created;
}
@override
int get hashCode {
return $jf($jc($jc($jc($jc(0, id.hashCode), user.hashCode), text.hashCode),
time_created.hashCode));
}
@override
String toString() {
return (newBuiltValueToStringHelper('YelpReview')
..add('id', id)
..add('user', user)
..add('text', text)
..add('time_created', time_created))
.toString();
}
}
class YelpReviewBuilder implements Builder<YelpReview, YelpReviewBuilder> {
_$YelpReview _$v;
String _id;
String get id => _$this._id;
set id(String id) => _$this._id = id;
YelpUserBuilder _user;
YelpUserBuilder get user => _$this._user ??= new YelpUserBuilder();
set user(YelpUserBuilder user) => _$this._user = user;
String _text;
String get text => _$this._text;
set text(String text) => _$this._text = text;
String _time_created;
String get time_created => _$this._time_created;
set time_created(String time_created) => _$this._time_created = time_created;
YelpReviewBuilder();
YelpReviewBuilder get _$this {
if (_$v != null) {
_id = _$v.id;
_user = _$v.user?.toBuilder();
_text = _$v.text;
_time_created = _$v.time_created;
_$v = null;
}
return this;
}
@override
void replace(YelpReview other) {
if (other == null) {
throw new ArgumentError.notNull('other');
}
_$v = other as _$YelpReview;
}
@override
void update(void Function(YelpReviewBuilder) updates) {
if (updates != null) updates(this);
}
@override
_$YelpReview build() {
_$YelpReview _$result;
try {
_$result = _$v ??
new _$YelpReview._(
id: id,
user: user.build(),
text: text,
time_created: time_created);
} catch (_) {
String _$failedField;
try {
_$failedField = 'user';
user.build();
} catch (e) {
throw new BuiltValueNestedFieldError(
'YelpReview', _$failedField, e.toString());
}
rethrow;
}
replace(_$result);
return _$result;
}
}
// ignore_for_file: always_put_control_body_on_new_line,always_specify_types,annotate_overrides,avoid_annotating_with_dynamic,avoid_as,avoid_catches_without_on_clauses,avoid_returning_this,lines_longer_than_80_chars,omit_local_variable_types,prefer_expression_function_bodies,sort_constructors_first,test_types_in_equals,unnecessary_const,unnecessary_new
| 0 |
mirrored_repositories/Chi_Food/lib | mirrored_repositories/Chi_Food/lib/model/baseUser.g.dart | // GENERATED CODE - DO NOT MODIFY BY HAND
part of 'baseUser.dart';
// **************************************************************************
// BuiltValueGenerator
// **************************************************************************
Serializer<BaseUser> _$baseUserSerializer = new _$BaseUserSerializer();
class _$BaseUserSerializer implements StructuredSerializer<BaseUser> {
@override
final Iterable<Type> types = const [BaseUser, _$BaseUser];
@override
final String wireName = 'BaseUser';
@override
Iterable<Object> serialize(Serializers serializers, BaseUser object,
{FullType specifiedType = FullType.unspecified}) {
final result = <Object>[
'username',
serializers.serialize(object.username,
specifiedType: const FullType(String)),
'foodie_color',
serializers.serialize(object.foodie_color,
specifiedType: const FullType(String)),
'primaryLocation',
serializers.serialize(object.primaryLocation,
specifiedType: const FullType(String)),
'cityId',
serializers.serialize(object.cityId, specifiedType: const FullType(int)),
'entityType',
serializers.serialize(object.entityType,
specifiedType: const FullType(String)),
'entityId',
serializers.serialize(object.entityId,
specifiedType: const FullType(int)),
'long',
serializers.serialize(object.long, specifiedType: const FullType(String)),
'lat',
serializers.serialize(object.lat, specifiedType: const FullType(String)),
];
if (object.uid != null) {
result
..add('uid')
..add(serializers.serialize(object.uid,
specifiedType: const FullType(String)));
}
if (object.foodie_level != null) {
result
..add('foodie_level')
..add(serializers.serialize(object.foodie_level,
specifiedType: const FullType(String)));
}
if (object.photoUrl != null) {
result
..add('photoUrl')
..add(serializers.serialize(object.photoUrl,
specifiedType: const FullType(String)));
}
return result;
}
@override
BaseUser deserialize(Serializers serializers, Iterable<Object> serialized,
{FullType specifiedType = FullType.unspecified}) {
final result = new BaseUserBuilder();
final iterator = serialized.iterator;
while (iterator.moveNext()) {
final key = iterator.current as String;
iterator.moveNext();
final dynamic value = iterator.current;
switch (key) {
case 'uid':
result.uid = serializers.deserialize(value,
specifiedType: const FullType(String)) as String;
break;
case 'username':
result.username = serializers.deserialize(value,
specifiedType: const FullType(String)) as String;
break;
case 'foodie_level':
result.foodie_level = serializers.deserialize(value,
specifiedType: const FullType(String)) as String;
break;
case 'photoUrl':
result.photoUrl = serializers.deserialize(value,
specifiedType: const FullType(String)) as String;
break;
case 'foodie_color':
result.foodie_color = serializers.deserialize(value,
specifiedType: const FullType(String)) as String;
break;
case 'primaryLocation':
result.primaryLocation = serializers.deserialize(value,
specifiedType: const FullType(String)) as String;
break;
case 'cityId':
result.cityId = serializers.deserialize(value,
specifiedType: const FullType(int)) as int;
break;
case 'entityType':
result.entityType = serializers.deserialize(value,
specifiedType: const FullType(String)) as String;
break;
case 'entityId':
result.entityId = serializers.deserialize(value,
specifiedType: const FullType(int)) as int;
break;
case 'long':
result.long = serializers.deserialize(value,
specifiedType: const FullType(String)) as String;
break;
case 'lat':
result.lat = serializers.deserialize(value,
specifiedType: const FullType(String)) as String;
break;
}
}
return result.build();
}
}
class _$BaseUser extends BaseUser {
@override
final String uid;
@override
final String username;
@override
final String foodie_level;
@override
final String photoUrl;
@override
final String foodie_color;
@override
final String primaryLocation;
@override
final int cityId;
@override
final String entityType;
@override
final int entityId;
@override
final String long;
@override
final String lat;
factory _$BaseUser([void Function(BaseUserBuilder) updates]) =>
(new BaseUserBuilder()..update(updates)).build();
_$BaseUser._(
{this.uid,
this.username,
this.foodie_level,
this.photoUrl,
this.foodie_color,
this.primaryLocation,
this.cityId,
this.entityType,
this.entityId,
this.long,
this.lat})
: super._() {
if (username == null) {
throw new BuiltValueNullFieldError('BaseUser', 'username');
}
if (foodie_color == null) {
throw new BuiltValueNullFieldError('BaseUser', 'foodie_color');
}
if (primaryLocation == null) {
throw new BuiltValueNullFieldError('BaseUser', 'primaryLocation');
}
if (cityId == null) {
throw new BuiltValueNullFieldError('BaseUser', 'cityId');
}
if (entityType == null) {
throw new BuiltValueNullFieldError('BaseUser', 'entityType');
}
if (entityId == null) {
throw new BuiltValueNullFieldError('BaseUser', 'entityId');
}
if (long == null) {
throw new BuiltValueNullFieldError('BaseUser', 'long');
}
if (lat == null) {
throw new BuiltValueNullFieldError('BaseUser', 'lat');
}
}
@override
BaseUser rebuild(void Function(BaseUserBuilder) updates) =>
(toBuilder()..update(updates)).build();
@override
BaseUserBuilder toBuilder() => new BaseUserBuilder()..replace(this);
@override
bool operator ==(Object other) {
if (identical(other, this)) return true;
return other is BaseUser &&
uid == other.uid &&
username == other.username &&
foodie_level == other.foodie_level &&
photoUrl == other.photoUrl &&
foodie_color == other.foodie_color &&
primaryLocation == other.primaryLocation &&
cityId == other.cityId &&
entityType == other.entityType &&
entityId == other.entityId &&
long == other.long &&
lat == other.lat;
}
@override
int get hashCode {
return $jf($jc(
$jc(
$jc(
$jc(
$jc(
$jc(
$jc(
$jc(
$jc(
$jc($jc(0, uid.hashCode),
username.hashCode),
foodie_level.hashCode),
photoUrl.hashCode),
foodie_color.hashCode),
primaryLocation.hashCode),
cityId.hashCode),
entityType.hashCode),
entityId.hashCode),
long.hashCode),
lat.hashCode));
}
@override
String toString() {
return (newBuiltValueToStringHelper('BaseUser')
..add('uid', uid)
..add('username', username)
..add('foodie_level', foodie_level)
..add('photoUrl', photoUrl)
..add('foodie_color', foodie_color)
..add('primaryLocation', primaryLocation)
..add('cityId', cityId)
..add('entityType', entityType)
..add('entityId', entityId)
..add('long', long)
..add('lat', lat))
.toString();
}
}
class BaseUserBuilder implements Builder<BaseUser, BaseUserBuilder> {
_$BaseUser _$v;
String _uid;
String get uid => _$this._uid;
set uid(String uid) => _$this._uid = uid;
String _username;
String get username => _$this._username;
set username(String username) => _$this._username = username;
String _foodie_level;
String get foodie_level => _$this._foodie_level;
set foodie_level(String foodie_level) => _$this._foodie_level = foodie_level;
String _photoUrl;
String get photoUrl => _$this._photoUrl;
set photoUrl(String photoUrl) => _$this._photoUrl = photoUrl;
String _foodie_color;
String get foodie_color => _$this._foodie_color;
set foodie_color(String foodie_color) => _$this._foodie_color = foodie_color;
String _primaryLocation;
String get primaryLocation => _$this._primaryLocation;
set primaryLocation(String primaryLocation) =>
_$this._primaryLocation = primaryLocation;
int _cityId;
int get cityId => _$this._cityId;
set cityId(int cityId) => _$this._cityId = cityId;
String _entityType;
String get entityType => _$this._entityType;
set entityType(String entityType) => _$this._entityType = entityType;
int _entityId;
int get entityId => _$this._entityId;
set entityId(int entityId) => _$this._entityId = entityId;
String _long;
String get long => _$this._long;
set long(String long) => _$this._long = long;
String _lat;
String get lat => _$this._lat;
set lat(String lat) => _$this._lat = lat;
BaseUserBuilder();
BaseUserBuilder get _$this {
if (_$v != null) {
_uid = _$v.uid;
_username = _$v.username;
_foodie_level = _$v.foodie_level;
_photoUrl = _$v.photoUrl;
_foodie_color = _$v.foodie_color;
_primaryLocation = _$v.primaryLocation;
_cityId = _$v.cityId;
_entityType = _$v.entityType;
_entityId = _$v.entityId;
_long = _$v.long;
_lat = _$v.lat;
_$v = null;
}
return this;
}
@override
void replace(BaseUser other) {
if (other == null) {
throw new ArgumentError.notNull('other');
}
_$v = other as _$BaseUser;
}
@override
void update(void Function(BaseUserBuilder) updates) {
if (updates != null) updates(this);
}
@override
_$BaseUser build() {
final _$result = _$v ??
new _$BaseUser._(
uid: uid,
username: username,
foodie_level: foodie_level,
photoUrl: photoUrl,
foodie_color: foodie_color,
primaryLocation: primaryLocation,
cityId: cityId,
entityType: entityType,
entityId: entityId,
long: long,
lat: lat);
replace(_$result);
return _$result;
}
}
// ignore_for_file: always_put_control_body_on_new_line,always_specify_types,annotate_overrides,avoid_annotating_with_dynamic,avoid_as,avoid_catches_without_on_clauses,avoid_returning_this,lines_longer_than_80_chars,omit_local_variable_types,prefer_expression_function_bodies,sort_constructors_first,test_types_in_equals,unnecessary_const,unnecessary_new
| 0 |
mirrored_repositories/Chi_Food/lib | mirrored_repositories/Chi_Food/lib/model/yelpReview.dart |
import 'package:built_value/built_value.dart';
import 'package:built_value/serializer.dart';
import 'package:chifood/model/yelpUser.dart';
part 'yelpReview.g.dart';
abstract class YelpReview implements Built<YelpReview,YelpReviewBuilder>{
static Serializer<YelpReview> get serializer => _$yelpReviewSerializer;
String get id;
YelpUser get user;
String get text;
String get time_created;
YelpReview._();
factory YelpReview([void Function(YelpReviewBuilder) updates]) =_$YelpReview;
} | 0 |
mirrored_repositories/Chi_Food/lib | mirrored_repositories/Chi_Food/lib/model/establishment.dart |
import 'package:built_value/built_value.dart';
import 'package:built_value/serializer.dart';
part 'establishment.g.dart';
abstract class Establishment implements Built<Establishment,EstablishmentBuilder>{
static Serializer<Establishment> get serializer => _$establishmentSerializer;
int get id;
String get name;
Establishment._();
factory Establishment([void Function(EstablishmentBuilder) updates]) =_$Establishment;
} | 0 |
mirrored_repositories/Chi_Food/lib | mirrored_repositories/Chi_Food/lib/model/yelpUser.dart | import 'package:built_value/built_value.dart';
import 'package:built_value/serializer.dart';
part 'yelpUser.g.dart';
abstract class YelpUser implements Built<YelpUser,YelpUserBuilder>{
static Serializer<YelpUser> get serializer => _$yelpUserSerializer;
String get id;
String get profile_url;
String get image_url;
String get name;
YelpUser._();
factory YelpUser([void Function(YelpUserBuilder) updates]) =_$YelpUser;
} | 0 |
mirrored_repositories/Chi_Food/lib | mirrored_repositories/Chi_Food/lib/model/restaurants.dart |
import 'package:built_collection/built_collection.dart';
import 'package:built_collection/built_collection.dart';
import 'package:built_value/built_value.dart';
import 'package:built_value/serializer.dart';
import 'package:chifood/model/location.dart';
import 'package:chifood/model/photo.dart';
import 'package:chifood/model/review.dart';
import 'package:chifood/model/userRating.dart';
part 'restaurants.g.dart';
abstract class Restaurants implements Built<Restaurants,RestaurantsBuilder>{
static Serializer<Restaurants> get serializer => _$restaurantsSerializer;
@nullable
String get id;
@nullable
String get name;
@nullable
String get url;
@nullable
Location get location;
@nullable
int get average_cost_for_two;
@nullable
String get cuisines;
@nullable
int get price_range;
@nullable
String get currency;
@nullable
String get thumb;
@nullable
String get featured_image;
@nullable
String get photos_url;
@nullable
String get menu_url;
@nullable
String get events_url;
@nullable
UserRating get user_rating;
@nullable
int get has_online_delivery;
@nullable
int get is_delivering_now;
@nullable
int get has_table_booking;
String get deeplink;
@nullable
String get timing;
@nullable
int get all_reviews_count;
@nullable
int get photo_count;
@nullable
String get phone_numbers;
@nullable
BuiltList<Photo> get photos;
Restaurants._();
factory Restaurants([void Function(RestaurantsBuilder) updates]) =_$Restaurants;
} | 0 |
mirrored_repositories/Chi_Food/lib | mirrored_repositories/Chi_Food/lib/model/userRating.dart | import 'package:built_value/built_value.dart';
import 'package:built_value/serializer.dart';
part 'userRating.g.dart';
abstract class UserRating implements Built<UserRating,UserRatingBuilder>{
static Serializer<UserRating> get serializer => _$userRatingSerializer;
String get aggregate_rating;
String get rating_text;
String get rating_color;
String get votes;
UserRating._();
factory UserRating([void Function(UserRatingBuilder) updates]) =_$UserRating;
} | 0 |
mirrored_repositories/Chi_Food/lib | mirrored_repositories/Chi_Food/lib/model/review.dart | import 'package:built_value/built_value.dart';
import 'package:built_value/serializer.dart';
import 'package:chifood/model/reviewUser.dart';
part 'review.g.dart';
abstract class Review implements Built<Review,ReviewBuilder>{
static Serializer<Review> get serializer => _$reviewSerializer;
String get rating;
String get review_text;
String get id;
String get rating_color;
String get review_time_friendly;
String get rating_text;
String get timestamp;
num get likes;
ReviewUser get users;
num get comments_count;
Review._();
factory Review([void Function(ReviewBuilder) updates]) =_$Review;
} | 0 |
mirrored_repositories/Chi_Food/lib | mirrored_repositories/Chi_Food/lib/model/location.dart |
import 'package:built_value/built_value.dart';
import 'package:built_value/serializer.dart';
part 'location.g.dart';
abstract class Location implements Built<Location,LocationBuilder>{
static Serializer<Location> get serializer => _$locationSerializer;
@nullable
String get locality;
@nullable
String get address;
@nullable
String get city;
String get latitude;
String get longitude;
String get zipcode;
num get country_id;
Location._();
factory Location([void Function(LocationBuilder) updates]) =_$Location;
} | 0 |
mirrored_repositories/Chi_Food/lib | mirrored_repositories/Chi_Food/lib/model/photo.dart |
import 'package:built_value/built_value.dart';
import 'package:built_value/serializer.dart';
import 'package:chifood/model/review.dart';
import 'package:chifood/model/reviewUser.dart';
part 'photo.g.dart';
abstract class Photo implements Built<Photo,PhotoBuilder>{
static Serializer<Photo> get serializer => _$photoSerializer;
String get id;
String get url;
String get thumb_url;
ReviewUser get user;
String get res_id;
String get caption;
String get timestamp;
String get friendly_time;
int get width;
int get height;
int get comments_count;
int get likes_count;
Photo._();
factory Photo([void Function(PhotoBuilder) updates]) =_$Photo;
} | 0 |
mirrored_repositories/Chi_Food/lib | mirrored_repositories/Chi_Food/lib/model/orderItem.dart | import 'package:built_value/built_value.dart';
import 'package:built_value/serializer.dart';
import 'package:chifood/model/menuItem.dart';
import 'package:chifood/model/restaurants.dart';
import 'package:chifood/model/review.dart';
import 'package:chifood/model/reviewUser.dart';
import 'package:chifood/ui/pages/restaurantScreen.dart';
part 'orderItem.g.dart';
abstract class OrderItem implements Built<OrderItem,OrderItemBuilder>{
static Serializer<OrderItem> get serializer => _$orderItemSerializer;
@nullable
String get id;
String get strMeal;
String get strMealThumb;
String get idMeal;
double get price;
int get count;
@nullable
Restaurants get restaurant;
OrderItem._();
factory OrderItem([void Function(OrderItemBuilder) updates]) =_$OrderItem;
} | 0 |
mirrored_repositories/Chi_Food/lib | mirrored_repositories/Chi_Food/lib/model/review.g.dart | // GENERATED CODE - DO NOT MODIFY BY HAND
part of 'review.dart';
// **************************************************************************
// BuiltValueGenerator
// **************************************************************************
Serializer<Review> _$reviewSerializer = new _$ReviewSerializer();
class _$ReviewSerializer implements StructuredSerializer<Review> {
@override
final Iterable<Type> types = const [Review, _$Review];
@override
final String wireName = 'Review';
@override
Iterable<Object> serialize(Serializers serializers, Review object,
{FullType specifiedType = FullType.unspecified}) {
final result = <Object>[
'rating',
serializers.serialize(object.rating,
specifiedType: const FullType(String)),
'review_text',
serializers.serialize(object.review_text,
specifiedType: const FullType(String)),
'id',
serializers.serialize(object.id, specifiedType: const FullType(String)),
'rating_color',
serializers.serialize(object.rating_color,
specifiedType: const FullType(String)),
'review_time_friendly',
serializers.serialize(object.review_time_friendly,
specifiedType: const FullType(String)),
'rating_text',
serializers.serialize(object.rating_text,
specifiedType: const FullType(String)),
'timestamp',
serializers.serialize(object.timestamp,
specifiedType: const FullType(String)),
'likes',
serializers.serialize(object.likes, specifiedType: const FullType(num)),
'users',
serializers.serialize(object.users,
specifiedType: const FullType(ReviewUser)),
'comments_count',
serializers.serialize(object.comments_count,
specifiedType: const FullType(num)),
];
return result;
}
@override
Review deserialize(Serializers serializers, Iterable<Object> serialized,
{FullType specifiedType = FullType.unspecified}) {
final result = new ReviewBuilder();
final iterator = serialized.iterator;
while (iterator.moveNext()) {
final key = iterator.current as String;
iterator.moveNext();
final dynamic value = iterator.current;
switch (key) {
case 'rating':
result.rating = serializers.deserialize(value,
specifiedType: const FullType(String)) as String;
break;
case 'review_text':
result.review_text = serializers.deserialize(value,
specifiedType: const FullType(String)) as String;
break;
case 'id':
result.id = serializers.deserialize(value,
specifiedType: const FullType(String)) as String;
break;
case 'rating_color':
result.rating_color = serializers.deserialize(value,
specifiedType: const FullType(String)) as String;
break;
case 'review_time_friendly':
result.review_time_friendly = serializers.deserialize(value,
specifiedType: const FullType(String)) as String;
break;
case 'rating_text':
result.rating_text = serializers.deserialize(value,
specifiedType: const FullType(String)) as String;
break;
case 'timestamp':
result.timestamp = serializers.deserialize(value,
specifiedType: const FullType(String)) as String;
break;
case 'likes':
result.likes = serializers.deserialize(value,
specifiedType: const FullType(num)) as num;
break;
case 'users':
result.users.replace(serializers.deserialize(value,
specifiedType: const FullType(ReviewUser)) as ReviewUser);
break;
case 'comments_count':
result.comments_count = serializers.deserialize(value,
specifiedType: const FullType(num)) as num;
break;
}
}
return result.build();
}
}
class _$Review extends Review {
@override
final String rating;
@override
final String review_text;
@override
final String id;
@override
final String rating_color;
@override
final String review_time_friendly;
@override
final String rating_text;
@override
final String timestamp;
@override
final num likes;
@override
final ReviewUser users;
@override
final num comments_count;
factory _$Review([void Function(ReviewBuilder) updates]) =>
(new ReviewBuilder()..update(updates)).build();
_$Review._(
{this.rating,
this.review_text,
this.id,
this.rating_color,
this.review_time_friendly,
this.rating_text,
this.timestamp,
this.likes,
this.users,
this.comments_count})
: super._() {
if (rating == null) {
throw new BuiltValueNullFieldError('Review', 'rating');
}
if (review_text == null) {
throw new BuiltValueNullFieldError('Review', 'review_text');
}
if (id == null) {
throw new BuiltValueNullFieldError('Review', 'id');
}
if (rating_color == null) {
throw new BuiltValueNullFieldError('Review', 'rating_color');
}
if (review_time_friendly == null) {
throw new BuiltValueNullFieldError('Review', 'review_time_friendly');
}
if (rating_text == null) {
throw new BuiltValueNullFieldError('Review', 'rating_text');
}
if (timestamp == null) {
throw new BuiltValueNullFieldError('Review', 'timestamp');
}
if (likes == null) {
throw new BuiltValueNullFieldError('Review', 'likes');
}
if (users == null) {
throw new BuiltValueNullFieldError('Review', 'users');
}
if (comments_count == null) {
throw new BuiltValueNullFieldError('Review', 'comments_count');
}
}
@override
Review rebuild(void Function(ReviewBuilder) updates) =>
(toBuilder()..update(updates)).build();
@override
ReviewBuilder toBuilder() => new ReviewBuilder()..replace(this);
@override
bool operator ==(Object other) {
if (identical(other, this)) return true;
return other is Review &&
rating == other.rating &&
review_text == other.review_text &&
id == other.id &&
rating_color == other.rating_color &&
review_time_friendly == other.review_time_friendly &&
rating_text == other.rating_text &&
timestamp == other.timestamp &&
likes == other.likes &&
users == other.users &&
comments_count == other.comments_count;
}
@override
int get hashCode {
return $jf($jc(
$jc(
$jc(
$jc(
$jc(
$jc(
$jc(
$jc(
$jc($jc(0, rating.hashCode),
review_text.hashCode),
id.hashCode),
rating_color.hashCode),
review_time_friendly.hashCode),
rating_text.hashCode),
timestamp.hashCode),
likes.hashCode),
users.hashCode),
comments_count.hashCode));
}
@override
String toString() {
return (newBuiltValueToStringHelper('Review')
..add('rating', rating)
..add('review_text', review_text)
..add('id', id)
..add('rating_color', rating_color)
..add('review_time_friendly', review_time_friendly)
..add('rating_text', rating_text)
..add('timestamp', timestamp)
..add('likes', likes)
..add('users', users)
..add('comments_count', comments_count))
.toString();
}
}
class ReviewBuilder implements Builder<Review, ReviewBuilder> {
_$Review _$v;
String _rating;
String get rating => _$this._rating;
set rating(String rating) => _$this._rating = rating;
String _review_text;
String get review_text => _$this._review_text;
set review_text(String review_text) => _$this._review_text = review_text;
String _id;
String get id => _$this._id;
set id(String id) => _$this._id = id;
String _rating_color;
String get rating_color => _$this._rating_color;
set rating_color(String rating_color) => _$this._rating_color = rating_color;
String _review_time_friendly;
String get review_time_friendly => _$this._review_time_friendly;
set review_time_friendly(String review_time_friendly) =>
_$this._review_time_friendly = review_time_friendly;
String _rating_text;
String get rating_text => _$this._rating_text;
set rating_text(String rating_text) => _$this._rating_text = rating_text;
String _timestamp;
String get timestamp => _$this._timestamp;
set timestamp(String timestamp) => _$this._timestamp = timestamp;
num _likes;
num get likes => _$this._likes;
set likes(num likes) => _$this._likes = likes;
ReviewUserBuilder _users;
ReviewUserBuilder get users => _$this._users ??= new ReviewUserBuilder();
set users(ReviewUserBuilder users) => _$this._users = users;
num _comments_count;
num get comments_count => _$this._comments_count;
set comments_count(num comments_count) =>
_$this._comments_count = comments_count;
ReviewBuilder();
ReviewBuilder get _$this {
if (_$v != null) {
_rating = _$v.rating;
_review_text = _$v.review_text;
_id = _$v.id;
_rating_color = _$v.rating_color;
_review_time_friendly = _$v.review_time_friendly;
_rating_text = _$v.rating_text;
_timestamp = _$v.timestamp;
_likes = _$v.likes;
_users = _$v.users?.toBuilder();
_comments_count = _$v.comments_count;
_$v = null;
}
return this;
}
@override
void replace(Review other) {
if (other == null) {
throw new ArgumentError.notNull('other');
}
_$v = other as _$Review;
}
@override
void update(void Function(ReviewBuilder) updates) {
if (updates != null) updates(this);
}
@override
_$Review build() {
_$Review _$result;
try {
_$result = _$v ??
new _$Review._(
rating: rating,
review_text: review_text,
id: id,
rating_color: rating_color,
review_time_friendly: review_time_friendly,
rating_text: rating_text,
timestamp: timestamp,
likes: likes,
users: users.build(),
comments_count: comments_count);
} catch (_) {
String _$failedField;
try {
_$failedField = 'users';
users.build();
} catch (e) {
throw new BuiltValueNestedFieldError(
'Review', _$failedField, e.toString());
}
rethrow;
}
replace(_$result);
return _$result;
}
}
// ignore_for_file: always_put_control_body_on_new_line,always_specify_types,annotate_overrides,avoid_annotating_with_dynamic,avoid_as,avoid_catches_without_on_clauses,avoid_returning_this,lines_longer_than_80_chars,omit_local_variable_types,prefer_expression_function_bodies,sort_constructors_first,test_types_in_equals,unnecessary_const,unnecessary_new
| 0 |
mirrored_repositories/Chi_Food/lib | mirrored_repositories/Chi_Food/lib/model/menuItem.g.dart | // GENERATED CODE - DO NOT MODIFY BY HAND
part of 'menuItem.dart';
// **************************************************************************
// BuiltValueGenerator
// **************************************************************************
Serializer<MenuItem> _$menuItemSerializer = new _$MenuItemSerializer();
class _$MenuItemSerializer implements StructuredSerializer<MenuItem> {
@override
final Iterable<Type> types = const [MenuItem, _$MenuItem];
@override
final String wireName = 'MenuItem';
@override
Iterable<Object> serialize(Serializers serializers, MenuItem object,
{FullType specifiedType = FullType.unspecified}) {
final result = <Object>[
'strMeal',
serializers.serialize(object.strMeal,
specifiedType: const FullType(String)),
'strMealThumb',
serializers.serialize(object.strMealThumb,
specifiedType: const FullType(String)),
'idMeal',
serializers.serialize(object.idMeal,
specifiedType: const FullType(String)),
];
return result;
}
@override
MenuItem deserialize(Serializers serializers, Iterable<Object> serialized,
{FullType specifiedType = FullType.unspecified}) {
final result = new MenuItemBuilder();
final iterator = serialized.iterator;
while (iterator.moveNext()) {
final key = iterator.current as String;
iterator.moveNext();
final dynamic value = iterator.current;
switch (key) {
case 'strMeal':
result.strMeal = serializers.deserialize(value,
specifiedType: const FullType(String)) as String;
break;
case 'strMealThumb':
result.strMealThumb = serializers.deserialize(value,
specifiedType: const FullType(String)) as String;
break;
case 'idMeal':
result.idMeal = serializers.deserialize(value,
specifiedType: const FullType(String)) as String;
break;
}
}
return result.build();
}
}
class _$MenuItem extends MenuItem {
@override
final String strMeal;
@override
final String strMealThumb;
@override
final String idMeal;
factory _$MenuItem([void Function(MenuItemBuilder) updates]) =>
(new MenuItemBuilder()..update(updates)).build();
_$MenuItem._({this.strMeal, this.strMealThumb, this.idMeal}) : super._() {
if (strMeal == null) {
throw new BuiltValueNullFieldError('MenuItem', 'strMeal');
}
if (strMealThumb == null) {
throw new BuiltValueNullFieldError('MenuItem', 'strMealThumb');
}
if (idMeal == null) {
throw new BuiltValueNullFieldError('MenuItem', 'idMeal');
}
}
@override
MenuItem rebuild(void Function(MenuItemBuilder) updates) =>
(toBuilder()..update(updates)).build();
@override
MenuItemBuilder toBuilder() => new MenuItemBuilder()..replace(this);
@override
bool operator ==(Object other) {
if (identical(other, this)) return true;
return other is MenuItem &&
strMeal == other.strMeal &&
strMealThumb == other.strMealThumb &&
idMeal == other.idMeal;
}
@override
int get hashCode {
return $jf($jc(
$jc($jc(0, strMeal.hashCode), strMealThumb.hashCode), idMeal.hashCode));
}
@override
String toString() {
return (newBuiltValueToStringHelper('MenuItem')
..add('strMeal', strMeal)
..add('strMealThumb', strMealThumb)
..add('idMeal', idMeal))
.toString();
}
}
class MenuItemBuilder implements Builder<MenuItem, MenuItemBuilder> {
_$MenuItem _$v;
String _strMeal;
String get strMeal => _$this._strMeal;
set strMeal(String strMeal) => _$this._strMeal = strMeal;
String _strMealThumb;
String get strMealThumb => _$this._strMealThumb;
set strMealThumb(String strMealThumb) => _$this._strMealThumb = strMealThumb;
String _idMeal;
String get idMeal => _$this._idMeal;
set idMeal(String idMeal) => _$this._idMeal = idMeal;
MenuItemBuilder();
MenuItemBuilder get _$this {
if (_$v != null) {
_strMeal = _$v.strMeal;
_strMealThumb = _$v.strMealThumb;
_idMeal = _$v.idMeal;
_$v = null;
}
return this;
}
@override
void replace(MenuItem other) {
if (other == null) {
throw new ArgumentError.notNull('other');
}
_$v = other as _$MenuItem;
}
@override
void update(void Function(MenuItemBuilder) updates) {
if (updates != null) updates(this);
}
@override
_$MenuItem build() {
final _$result = _$v ??
new _$MenuItem._(
strMeal: strMeal, strMealThumb: strMealThumb, idMeal: idMeal);
replace(_$result);
return _$result;
}
}
// ignore_for_file: always_put_control_body_on_new_line,always_specify_types,annotate_overrides,avoid_annotating_with_dynamic,avoid_as,avoid_catches_without_on_clauses,avoid_returning_this,lines_longer_than_80_chars,omit_local_variable_types,prefer_expression_function_bodies,sort_constructors_first,test_types_in_equals,unnecessary_const,unnecessary_new
| 0 |
mirrored_repositories/Chi_Food/lib | mirrored_repositories/Chi_Food/lib/model/serializer.dart | import 'package:built_collection/built_collection.dart';
import 'package:built_value/serializer.dart';
import 'package:built_value/standard_json_plugin.dart';
import 'package:chifood/model/baseUser.dart';
import 'package:chifood/model/category.dart';
import 'package:chifood/model/cuisine.dart';
import 'package:chifood/model/dailyMenu.dart';
import 'package:chifood/model/dish.dart';
import 'package:chifood/model/establishment.dart';
import 'package:chifood/model/geoLocation.dart';
import 'package:chifood/model/location.dart';
import 'package:chifood/model/locationDetail.dart';
import 'package:chifood/model/locationLocation.dart';
import 'package:chifood/model/menuCategory.dart';
import 'package:chifood/model/menuItem.dart';
import 'package:chifood/model/photo.dart';
import 'package:chifood/model/popularity.dart';
import 'package:chifood/model/restaurants.dart';
import 'package:chifood/model/review.dart';
import 'package:chifood/model/reviewUser.dart';
import 'package:chifood/model/searchResult.dart';
import 'package:chifood/model/userRating.dart';
import 'package:chifood/model/yelpBusiness.dart';
import 'package:chifood/model/yelpCoordinate.dart';
import 'package:chifood/model/yelpLocation.dart';
import 'package:chifood/model/yelpOpen.dart';
import 'package:chifood/model/yelpReview.dart';
import 'package:chifood/model/yelpUser.dart';
part 'serializer.g.dart';
@SerializersFor([BaseUser,Location,LocationLocation,LocationDetail,Photo,Popularity,Restaurants,Review,ReviewUser,UserRating,
SearchResult,Establishment,Cuisine,GeoLocation,DailyMenu,Category,Dish,YelpUser,YelpCoordinate,YelpLocation,YelpOpen,YelpReview,YelpBusiness,MenuItem,MenuCategory])
final Serializers serializer = _$serializer;
Serializers standardSerializers = (serializer.toBuilder()..addPlugin(StandardJsonPlugin())).build(); | 0 |
mirrored_repositories/Chi_Food/lib | mirrored_repositories/Chi_Food/lib/model/searchResult.dart |
import 'package:built_collection/built_collection.dart';
import 'package:built_value/built_value.dart';
import 'package:built_value/serializer.dart';
import 'package:chifood/model/restaurants.dart';
part 'searchResult.g.dart';
abstract class SearchResult implements Built<SearchResult,SearchResultBuilder>{
static Serializer<SearchResult> get serializer => _$searchResultSerializer;
int get results_found;
int get results_start;
int get results_shown;
BuiltList<Restaurants> get restaurants;
SearchResult._();
factory SearchResult([void Function(SearchResultBuilder) updates]) =_$SearchResult;
} | 0 |
mirrored_repositories/Chi_Food/lib | mirrored_repositories/Chi_Food/lib/model/photo.g.dart | // GENERATED CODE - DO NOT MODIFY BY HAND
part of 'photo.dart';
// **************************************************************************
// BuiltValueGenerator
// **************************************************************************
Serializer<Photo> _$photoSerializer = new _$PhotoSerializer();
class _$PhotoSerializer implements StructuredSerializer<Photo> {
@override
final Iterable<Type> types = const [Photo, _$Photo];
@override
final String wireName = 'Photo';
@override
Iterable<Object> serialize(Serializers serializers, Photo object,
{FullType specifiedType = FullType.unspecified}) {
final result = <Object>[
'id',
serializers.serialize(object.id, specifiedType: const FullType(String)),
'url',
serializers.serialize(object.url, specifiedType: const FullType(String)),
'thumb_url',
serializers.serialize(object.thumb_url,
specifiedType: const FullType(String)),
'user',
serializers.serialize(object.user,
specifiedType: const FullType(ReviewUser)),
'res_id',
serializers.serialize(object.res_id,
specifiedType: const FullType(String)),
'caption',
serializers.serialize(object.caption,
specifiedType: const FullType(String)),
'timestamp',
serializers.serialize(object.timestamp,
specifiedType: const FullType(String)),
'friendly_time',
serializers.serialize(object.friendly_time,
specifiedType: const FullType(String)),
'width',
serializers.serialize(object.width, specifiedType: const FullType(int)),
'height',
serializers.serialize(object.height, specifiedType: const FullType(int)),
'comments_count',
serializers.serialize(object.comments_count,
specifiedType: const FullType(int)),
'likes_count',
serializers.serialize(object.likes_count,
specifiedType: const FullType(int)),
];
return result;
}
@override
Photo deserialize(Serializers serializers, Iterable<Object> serialized,
{FullType specifiedType = FullType.unspecified}) {
final result = new PhotoBuilder();
final iterator = serialized.iterator;
while (iterator.moveNext()) {
final key = iterator.current as String;
iterator.moveNext();
final dynamic value = iterator.current;
switch (key) {
case 'id':
result.id = serializers.deserialize(value,
specifiedType: const FullType(String)) as String;
break;
case 'url':
result.url = serializers.deserialize(value,
specifiedType: const FullType(String)) as String;
break;
case 'thumb_url':
result.thumb_url = serializers.deserialize(value,
specifiedType: const FullType(String)) as String;
break;
case 'user':
result.user.replace(serializers.deserialize(value,
specifiedType: const FullType(ReviewUser)) as ReviewUser);
break;
case 'res_id':
result.res_id = serializers.deserialize(value,
specifiedType: const FullType(String)) as String;
break;
case 'caption':
result.caption = serializers.deserialize(value,
specifiedType: const FullType(String)) as String;
break;
case 'timestamp':
result.timestamp = serializers.deserialize(value,
specifiedType: const FullType(String)) as String;
break;
case 'friendly_time':
result.friendly_time = serializers.deserialize(value,
specifiedType: const FullType(String)) as String;
break;
case 'width':
result.width = serializers.deserialize(value,
specifiedType: const FullType(int)) as int;
break;
case 'height':
result.height = serializers.deserialize(value,
specifiedType: const FullType(int)) as int;
break;
case 'comments_count':
result.comments_count = serializers.deserialize(value,
specifiedType: const FullType(int)) as int;
break;
case 'likes_count':
result.likes_count = serializers.deserialize(value,
specifiedType: const FullType(int)) as int;
break;
}
}
return result.build();
}
}
class _$Photo extends Photo {
@override
final String id;
@override
final String url;
@override
final String thumb_url;
@override
final ReviewUser user;
@override
final String res_id;
@override
final String caption;
@override
final String timestamp;
@override
final String friendly_time;
@override
final int width;
@override
final int height;
@override
final int comments_count;
@override
final int likes_count;
factory _$Photo([void Function(PhotoBuilder) updates]) =>
(new PhotoBuilder()..update(updates)).build();
_$Photo._(
{this.id,
this.url,
this.thumb_url,
this.user,
this.res_id,
this.caption,
this.timestamp,
this.friendly_time,
this.width,
this.height,
this.comments_count,
this.likes_count})
: super._() {
if (id == null) {
throw new BuiltValueNullFieldError('Photo', 'id');
}
if (url == null) {
throw new BuiltValueNullFieldError('Photo', 'url');
}
if (thumb_url == null) {
throw new BuiltValueNullFieldError('Photo', 'thumb_url');
}
if (user == null) {
throw new BuiltValueNullFieldError('Photo', 'user');
}
if (res_id == null) {
throw new BuiltValueNullFieldError('Photo', 'res_id');
}
if (caption == null) {
throw new BuiltValueNullFieldError('Photo', 'caption');
}
if (timestamp == null) {
throw new BuiltValueNullFieldError('Photo', 'timestamp');
}
if (friendly_time == null) {
throw new BuiltValueNullFieldError('Photo', 'friendly_time');
}
if (width == null) {
throw new BuiltValueNullFieldError('Photo', 'width');
}
if (height == null) {
throw new BuiltValueNullFieldError('Photo', 'height');
}
if (comments_count == null) {
throw new BuiltValueNullFieldError('Photo', 'comments_count');
}
if (likes_count == null) {
throw new BuiltValueNullFieldError('Photo', 'likes_count');
}
}
@override
Photo rebuild(void Function(PhotoBuilder) updates) =>
(toBuilder()..update(updates)).build();
@override
PhotoBuilder toBuilder() => new PhotoBuilder()..replace(this);
@override
bool operator ==(Object other) {
if (identical(other, this)) return true;
return other is Photo &&
id == other.id &&
url == other.url &&
thumb_url == other.thumb_url &&
user == other.user &&
res_id == other.res_id &&
caption == other.caption &&
timestamp == other.timestamp &&
friendly_time == other.friendly_time &&
width == other.width &&
height == other.height &&
comments_count == other.comments_count &&
likes_count == other.likes_count;
}
@override
int get hashCode {
return $jf($jc(
$jc(
$jc(
$jc(
$jc(
$jc(
$jc(
$jc(
$jc(
$jc(
$jc($jc(0, id.hashCode),
url.hashCode),
thumb_url.hashCode),
user.hashCode),
res_id.hashCode),
caption.hashCode),
timestamp.hashCode),
friendly_time.hashCode),
width.hashCode),
height.hashCode),
comments_count.hashCode),
likes_count.hashCode));
}
@override
String toString() {
return (newBuiltValueToStringHelper('Photo')
..add('id', id)
..add('url', url)
..add('thumb_url', thumb_url)
..add('user', user)
..add('res_id', res_id)
..add('caption', caption)
..add('timestamp', timestamp)
..add('friendly_time', friendly_time)
..add('width', width)
..add('height', height)
..add('comments_count', comments_count)
..add('likes_count', likes_count))
.toString();
}
}
class PhotoBuilder implements Builder<Photo, PhotoBuilder> {
_$Photo _$v;
String _id;
String get id => _$this._id;
set id(String id) => _$this._id = id;
String _url;
String get url => _$this._url;
set url(String url) => _$this._url = url;
String _thumb_url;
String get thumb_url => _$this._thumb_url;
set thumb_url(String thumb_url) => _$this._thumb_url = thumb_url;
ReviewUserBuilder _user;
ReviewUserBuilder get user => _$this._user ??= new ReviewUserBuilder();
set user(ReviewUserBuilder user) => _$this._user = user;
String _res_id;
String get res_id => _$this._res_id;
set res_id(String res_id) => _$this._res_id = res_id;
String _caption;
String get caption => _$this._caption;
set caption(String caption) => _$this._caption = caption;
String _timestamp;
String get timestamp => _$this._timestamp;
set timestamp(String timestamp) => _$this._timestamp = timestamp;
String _friendly_time;
String get friendly_time => _$this._friendly_time;
set friendly_time(String friendly_time) =>
_$this._friendly_time = friendly_time;
int _width;
int get width => _$this._width;
set width(int width) => _$this._width = width;
int _height;
int get height => _$this._height;
set height(int height) => _$this._height = height;
int _comments_count;
int get comments_count => _$this._comments_count;
set comments_count(int comments_count) =>
_$this._comments_count = comments_count;
int _likes_count;
int get likes_count => _$this._likes_count;
set likes_count(int likes_count) => _$this._likes_count = likes_count;
PhotoBuilder();
PhotoBuilder get _$this {
if (_$v != null) {
_id = _$v.id;
_url = _$v.url;
_thumb_url = _$v.thumb_url;
_user = _$v.user?.toBuilder();
_res_id = _$v.res_id;
_caption = _$v.caption;
_timestamp = _$v.timestamp;
_friendly_time = _$v.friendly_time;
_width = _$v.width;
_height = _$v.height;
_comments_count = _$v.comments_count;
_likes_count = _$v.likes_count;
_$v = null;
}
return this;
}
@override
void replace(Photo other) {
if (other == null) {
throw new ArgumentError.notNull('other');
}
_$v = other as _$Photo;
}
@override
void update(void Function(PhotoBuilder) updates) {
if (updates != null) updates(this);
}
@override
_$Photo build() {
_$Photo _$result;
try {
_$result = _$v ??
new _$Photo._(
id: id,
url: url,
thumb_url: thumb_url,
user: user.build(),
res_id: res_id,
caption: caption,
timestamp: timestamp,
friendly_time: friendly_time,
width: width,
height: height,
comments_count: comments_count,
likes_count: likes_count);
} catch (_) {
String _$failedField;
try {
_$failedField = 'user';
user.build();
} catch (e) {
throw new BuiltValueNestedFieldError(
'Photo', _$failedField, e.toString());
}
rethrow;
}
replace(_$result);
return _$result;
}
}
// ignore_for_file: always_put_control_body_on_new_line,always_specify_types,annotate_overrides,avoid_annotating_with_dynamic,avoid_as,avoid_catches_without_on_clauses,avoid_returning_this,lines_longer_than_80_chars,omit_local_variable_types,prefer_expression_function_bodies,sort_constructors_first,test_types_in_equals,unnecessary_const,unnecessary_new
| 0 |
mirrored_repositories/Chi_Food/lib | mirrored_repositories/Chi_Food/lib/model/yelpBusiness.dart |
import 'package:built_collection/built_collection.dart';
import 'package:built_value/built_value.dart';
import 'package:built_value/serializer.dart';
import 'package:chifood/model/yelpCoordinate.dart';
import 'package:chifood/model/yelpLocation.dart';
import 'package:chifood/model/yelpOpen.dart';
part 'yelpBusiness.g.dart';
abstract class YelpBusiness implements Built<YelpBusiness,YelpBusinessBuilder>{
static Serializer<YelpBusiness> get serializer => _$yelpBusinessSerializer;
String get id;
String get alias;
String get name;
String get image_url;
String get phone;
double get rating;
YelpLocation get location;
YelpCoordinate get coordinates;
List<String> get photos;
String get price;
@nullable
BuiltList<YelpOpen> get open;
YelpBusiness._();
factory YelpBusiness([void Function(YelpBusinessBuilder) updates]) =_$YelpBusiness;
} | 0 |
mirrored_repositories/Chi_Food/lib | mirrored_repositories/Chi_Food/lib/model/reviewUser.g.dart | // GENERATED CODE - DO NOT MODIFY BY HAND
part of 'reviewUser.dart';
// **************************************************************************
// BuiltValueGenerator
// **************************************************************************
Serializer<ReviewUser> _$reviewUserSerializer = new _$ReviewUserSerializer();
class _$ReviewUserSerializer implements StructuredSerializer<ReviewUser> {
@override
final Iterable<Type> types = const [ReviewUser, _$ReviewUser];
@override
final String wireName = 'ReviewUser';
@override
Iterable<Object> serialize(Serializers serializers, ReviewUser object,
{FullType specifiedType = FullType.unspecified}) {
final result = <Object>[
'name',
serializers.serialize(object.name, specifiedType: const FullType(String)),
'zomato_handle',
serializers.serialize(object.zomato_handle,
specifiedType: const FullType(String)),
'foodie_level',
serializers.serialize(object.foodie_level,
specifiedType: const FullType(String)),
'foodie_level_num',
serializers.serialize(object.foodie_level_num,
specifiedType: const FullType(num)),
'foodie_color',
serializers.serialize(object.foodie_color,
specifiedType: const FullType(String)),
'profile_url',
serializers.serialize(object.profile_url,
specifiedType: const FullType(String)),
'profile_deeplink',
serializers.serialize(object.profile_deeplink,
specifiedType: const FullType(String)),
'profile_image',
serializers.serialize(object.profile_image,
specifiedType: const FullType(String)),
];
return result;
}
@override
ReviewUser deserialize(Serializers serializers, Iterable<Object> serialized,
{FullType specifiedType = FullType.unspecified}) {
final result = new ReviewUserBuilder();
final iterator = serialized.iterator;
while (iterator.moveNext()) {
final key = iterator.current as String;
iterator.moveNext();
final dynamic value = iterator.current;
switch (key) {
case 'name':
result.name = serializers.deserialize(value,
specifiedType: const FullType(String)) as String;
break;
case 'zomato_handle':
result.zomato_handle = serializers.deserialize(value,
specifiedType: const FullType(String)) as String;
break;
case 'foodie_level':
result.foodie_level = serializers.deserialize(value,
specifiedType: const FullType(String)) as String;
break;
case 'foodie_level_num':
result.foodie_level_num = serializers.deserialize(value,
specifiedType: const FullType(num)) as num;
break;
case 'foodie_color':
result.foodie_color = serializers.deserialize(value,
specifiedType: const FullType(String)) as String;
break;
case 'profile_url':
result.profile_url = serializers.deserialize(value,
specifiedType: const FullType(String)) as String;
break;
case 'profile_deeplink':
result.profile_deeplink = serializers.deserialize(value,
specifiedType: const FullType(String)) as String;
break;
case 'profile_image':
result.profile_image = serializers.deserialize(value,
specifiedType: const FullType(String)) as String;
break;
}
}
return result.build();
}
}
class _$ReviewUser extends ReviewUser {
@override
final String name;
@override
final String zomato_handle;
@override
final String foodie_level;
@override
final num foodie_level_num;
@override
final String foodie_color;
@override
final String profile_url;
@override
final String profile_deeplink;
@override
final String profile_image;
factory _$ReviewUser([void Function(ReviewUserBuilder) updates]) =>
(new ReviewUserBuilder()..update(updates)).build();
_$ReviewUser._(
{this.name,
this.zomato_handle,
this.foodie_level,
this.foodie_level_num,
this.foodie_color,
this.profile_url,
this.profile_deeplink,
this.profile_image})
: super._() {
if (name == null) {
throw new BuiltValueNullFieldError('ReviewUser', 'name');
}
if (zomato_handle == null) {
throw new BuiltValueNullFieldError('ReviewUser', 'zomato_handle');
}
if (foodie_level == null) {
throw new BuiltValueNullFieldError('ReviewUser', 'foodie_level');
}
if (foodie_level_num == null) {
throw new BuiltValueNullFieldError('ReviewUser', 'foodie_level_num');
}
if (foodie_color == null) {
throw new BuiltValueNullFieldError('ReviewUser', 'foodie_color');
}
if (profile_url == null) {
throw new BuiltValueNullFieldError('ReviewUser', 'profile_url');
}
if (profile_deeplink == null) {
throw new BuiltValueNullFieldError('ReviewUser', 'profile_deeplink');
}
if (profile_image == null) {
throw new BuiltValueNullFieldError('ReviewUser', 'profile_image');
}
}
@override
ReviewUser rebuild(void Function(ReviewUserBuilder) updates) =>
(toBuilder()..update(updates)).build();
@override
ReviewUserBuilder toBuilder() => new ReviewUserBuilder()..replace(this);
@override
bool operator ==(Object other) {
if (identical(other, this)) return true;
return other is ReviewUser &&
name == other.name &&
zomato_handle == other.zomato_handle &&
foodie_level == other.foodie_level &&
foodie_level_num == other.foodie_level_num &&
foodie_color == other.foodie_color &&
profile_url == other.profile_url &&
profile_deeplink == other.profile_deeplink &&
profile_image == other.profile_image;
}
@override
int get hashCode {
return $jf($jc(
$jc(
$jc(
$jc(
$jc(
$jc($jc($jc(0, name.hashCode), zomato_handle.hashCode),
foodie_level.hashCode),
foodie_level_num.hashCode),
foodie_color.hashCode),
profile_url.hashCode),
profile_deeplink.hashCode),
profile_image.hashCode));
}
@override
String toString() {
return (newBuiltValueToStringHelper('ReviewUser')
..add('name', name)
..add('zomato_handle', zomato_handle)
..add('foodie_level', foodie_level)
..add('foodie_level_num', foodie_level_num)
..add('foodie_color', foodie_color)
..add('profile_url', profile_url)
..add('profile_deeplink', profile_deeplink)
..add('profile_image', profile_image))
.toString();
}
}
class ReviewUserBuilder implements Builder<ReviewUser, ReviewUserBuilder> {
_$ReviewUser _$v;
String _name;
String get name => _$this._name;
set name(String name) => _$this._name = name;
String _zomato_handle;
String get zomato_handle => _$this._zomato_handle;
set zomato_handle(String zomato_handle) =>
_$this._zomato_handle = zomato_handle;
String _foodie_level;
String get foodie_level => _$this._foodie_level;
set foodie_level(String foodie_level) => _$this._foodie_level = foodie_level;
num _foodie_level_num;
num get foodie_level_num => _$this._foodie_level_num;
set foodie_level_num(num foodie_level_num) =>
_$this._foodie_level_num = foodie_level_num;
String _foodie_color;
String get foodie_color => _$this._foodie_color;
set foodie_color(String foodie_color) => _$this._foodie_color = foodie_color;
String _profile_url;
String get profile_url => _$this._profile_url;
set profile_url(String profile_url) => _$this._profile_url = profile_url;
String _profile_deeplink;
String get profile_deeplink => _$this._profile_deeplink;
set profile_deeplink(String profile_deeplink) =>
_$this._profile_deeplink = profile_deeplink;
String _profile_image;
String get profile_image => _$this._profile_image;
set profile_image(String profile_image) =>
_$this._profile_image = profile_image;
ReviewUserBuilder();
ReviewUserBuilder get _$this {
if (_$v != null) {
_name = _$v.name;
_zomato_handle = _$v.zomato_handle;
_foodie_level = _$v.foodie_level;
_foodie_level_num = _$v.foodie_level_num;
_foodie_color = _$v.foodie_color;
_profile_url = _$v.profile_url;
_profile_deeplink = _$v.profile_deeplink;
_profile_image = _$v.profile_image;
_$v = null;
}
return this;
}
@override
void replace(ReviewUser other) {
if (other == null) {
throw new ArgumentError.notNull('other');
}
_$v = other as _$ReviewUser;
}
@override
void update(void Function(ReviewUserBuilder) updates) {
if (updates != null) updates(this);
}
@override
_$ReviewUser build() {
final _$result = _$v ??
new _$ReviewUser._(
name: name,
zomato_handle: zomato_handle,
foodie_level: foodie_level,
foodie_level_num: foodie_level_num,
foodie_color: foodie_color,
profile_url: profile_url,
profile_deeplink: profile_deeplink,
profile_image: profile_image);
replace(_$result);
return _$result;
}
}
// ignore_for_file: always_put_control_body_on_new_line,always_specify_types,annotate_overrides,avoid_annotating_with_dynamic,avoid_as,avoid_catches_without_on_clauses,avoid_returning_this,lines_longer_than_80_chars,omit_local_variable_types,prefer_expression_function_bodies,sort_constructors_first,test_types_in_equals,unnecessary_const,unnecessary_new
| 0 |
mirrored_repositories/Chi_Food/lib | mirrored_repositories/Chi_Food/lib/model/yelpLocation.g.dart | // GENERATED CODE - DO NOT MODIFY BY HAND
part of 'yelpLocation.dart';
// **************************************************************************
// BuiltValueGenerator
// **************************************************************************
Serializer<YelpLocation> _$yelpLocationSerializer =
new _$YelpLocationSerializer();
class _$YelpLocationSerializer implements StructuredSerializer<YelpLocation> {
@override
final Iterable<Type> types = const [YelpLocation, _$YelpLocation];
@override
final String wireName = 'YelpLocation';
@override
Iterable<Object> serialize(Serializers serializers, YelpLocation object,
{FullType specifiedType = FullType.unspecified}) {
final result = <Object>[
'address1',
serializers.serialize(object.address1,
specifiedType: const FullType(String)),
'city',
serializers.serialize(object.city, specifiedType: const FullType(String)),
'zip_code',
serializers.serialize(object.zip_code,
specifiedType: const FullType(String)),
'country',
serializers.serialize(object.country,
specifiedType: const FullType(String)),
'display_address',
serializers.serialize(object.display_address,
specifiedType: const FullType(List, const [const FullType(String)])),
];
return result;
}
@override
YelpLocation deserialize(Serializers serializers, Iterable<Object> serialized,
{FullType specifiedType = FullType.unspecified}) {
final result = new YelpLocationBuilder();
final iterator = serialized.iterator;
while (iterator.moveNext()) {
final key = iterator.current as String;
iterator.moveNext();
final dynamic value = iterator.current;
switch (key) {
case 'address1':
result.address1 = serializers.deserialize(value,
specifiedType: const FullType(String)) as String;
break;
case 'city':
result.city = serializers.deserialize(value,
specifiedType: const FullType(String)) as String;
break;
case 'zip_code':
result.zip_code = serializers.deserialize(value,
specifiedType: const FullType(String)) as String;
break;
case 'country':
result.country = serializers.deserialize(value,
specifiedType: const FullType(String)) as String;
break;
case 'display_address':
result.display_address = serializers.deserialize(value,
specifiedType:
const FullType(List, const [const FullType(String)]))
as List<String>;
break;
}
}
return result.build();
}
}
class _$YelpLocation extends YelpLocation {
@override
final String address1;
@override
final String city;
@override
final String zip_code;
@override
final String country;
@override
final List<String> display_address;
factory _$YelpLocation([void Function(YelpLocationBuilder) updates]) =>
(new YelpLocationBuilder()..update(updates)).build();
_$YelpLocation._(
{this.address1,
this.city,
this.zip_code,
this.country,
this.display_address})
: super._() {
if (address1 == null) {
throw new BuiltValueNullFieldError('YelpLocation', 'address1');
}
if (city == null) {
throw new BuiltValueNullFieldError('YelpLocation', 'city');
}
if (zip_code == null) {
throw new BuiltValueNullFieldError('YelpLocation', 'zip_code');
}
if (country == null) {
throw new BuiltValueNullFieldError('YelpLocation', 'country');
}
if (display_address == null) {
throw new BuiltValueNullFieldError('YelpLocation', 'display_address');
}
}
@override
YelpLocation rebuild(void Function(YelpLocationBuilder) updates) =>
(toBuilder()..update(updates)).build();
@override
YelpLocationBuilder toBuilder() => new YelpLocationBuilder()..replace(this);
@override
bool operator ==(Object other) {
if (identical(other, this)) return true;
return other is YelpLocation &&
address1 == other.address1 &&
city == other.city &&
zip_code == other.zip_code &&
country == other.country &&
display_address == other.display_address;
}
@override
int get hashCode {
return $jf($jc(
$jc(
$jc($jc($jc(0, address1.hashCode), city.hashCode),
zip_code.hashCode),
country.hashCode),
display_address.hashCode));
}
@override
String toString() {
return (newBuiltValueToStringHelper('YelpLocation')
..add('address1', address1)
..add('city', city)
..add('zip_code', zip_code)
..add('country', country)
..add('display_address', display_address))
.toString();
}
}
class YelpLocationBuilder
implements Builder<YelpLocation, YelpLocationBuilder> {
_$YelpLocation _$v;
String _address1;
String get address1 => _$this._address1;
set address1(String address1) => _$this._address1 = address1;
String _city;
String get city => _$this._city;
set city(String city) => _$this._city = city;
String _zip_code;
String get zip_code => _$this._zip_code;
set zip_code(String zip_code) => _$this._zip_code = zip_code;
String _country;
String get country => _$this._country;
set country(String country) => _$this._country = country;
List<String> _display_address;
List<String> get display_address => _$this._display_address;
set display_address(List<String> display_address) =>
_$this._display_address = display_address;
YelpLocationBuilder();
YelpLocationBuilder get _$this {
if (_$v != null) {
_address1 = _$v.address1;
_city = _$v.city;
_zip_code = _$v.zip_code;
_country = _$v.country;
_display_address = _$v.display_address;
_$v = null;
}
return this;
}
@override
void replace(YelpLocation other) {
if (other == null) {
throw new ArgumentError.notNull('other');
}
_$v = other as _$YelpLocation;
}
@override
void update(void Function(YelpLocationBuilder) updates) {
if (updates != null) updates(this);
}
@override
_$YelpLocation build() {
final _$result = _$v ??
new _$YelpLocation._(
address1: address1,
city: city,
zip_code: zip_code,
country: country,
display_address: display_address);
replace(_$result);
return _$result;
}
}
// ignore_for_file: always_put_control_body_on_new_line,always_specify_types,annotate_overrides,avoid_annotating_with_dynamic,avoid_as,avoid_catches_without_on_clauses,avoid_returning_this,lines_longer_than_80_chars,omit_local_variable_types,prefer_expression_function_bodies,sort_constructors_first,test_types_in_equals,unnecessary_const,unnecessary_new
| 0 |
mirrored_repositories/Chi_Food/lib | mirrored_repositories/Chi_Food/lib/model/menuCategory.g.dart | // GENERATED CODE - DO NOT MODIFY BY HAND
part of 'menuCategory.dart';
// **************************************************************************
// BuiltValueGenerator
// **************************************************************************
Serializer<MenuCategory> _$menuCategorySerializer =
new _$MenuCategorySerializer();
class _$MenuCategorySerializer implements StructuredSerializer<MenuCategory> {
@override
final Iterable<Type> types = const [MenuCategory, _$MenuCategory];
@override
final String wireName = 'MenuCategory';
@override
Iterable<Object> serialize(Serializers serializers, MenuCategory object,
{FullType specifiedType = FullType.unspecified}) {
final result = <Object>[
'strCategory',
serializers.serialize(object.strCategory,
specifiedType: const FullType(String)),
];
return result;
}
@override
MenuCategory deserialize(Serializers serializers, Iterable<Object> serialized,
{FullType specifiedType = FullType.unspecified}) {
final result = new MenuCategoryBuilder();
final iterator = serialized.iterator;
while (iterator.moveNext()) {
final key = iterator.current as String;
iterator.moveNext();
final dynamic value = iterator.current;
switch (key) {
case 'strCategory':
result.strCategory = serializers.deserialize(value,
specifiedType: const FullType(String)) as String;
break;
}
}
return result.build();
}
}
class _$MenuCategory extends MenuCategory {
@override
final String strCategory;
factory _$MenuCategory([void Function(MenuCategoryBuilder) updates]) =>
(new MenuCategoryBuilder()..update(updates)).build();
_$MenuCategory._({this.strCategory}) : super._() {
if (strCategory == null) {
throw new BuiltValueNullFieldError('MenuCategory', 'strCategory');
}
}
@override
MenuCategory rebuild(void Function(MenuCategoryBuilder) updates) =>
(toBuilder()..update(updates)).build();
@override
MenuCategoryBuilder toBuilder() => new MenuCategoryBuilder()..replace(this);
@override
bool operator ==(Object other) {
if (identical(other, this)) return true;
return other is MenuCategory && strCategory == other.strCategory;
}
@override
int get hashCode {
return $jf($jc(0, strCategory.hashCode));
}
@override
String toString() {
return (newBuiltValueToStringHelper('MenuCategory')
..add('strCategory', strCategory))
.toString();
}
}
class MenuCategoryBuilder
implements Builder<MenuCategory, MenuCategoryBuilder> {
_$MenuCategory _$v;
String _strCategory;
String get strCategory => _$this._strCategory;
set strCategory(String strCategory) => _$this._strCategory = strCategory;
MenuCategoryBuilder();
MenuCategoryBuilder get _$this {
if (_$v != null) {
_strCategory = _$v.strCategory;
_$v = null;
}
return this;
}
@override
void replace(MenuCategory other) {
if (other == null) {
throw new ArgumentError.notNull('other');
}
_$v = other as _$MenuCategory;
}
@override
void update(void Function(MenuCategoryBuilder) updates) {
if (updates != null) updates(this);
}
@override
_$MenuCategory build() {
final _$result = _$v ?? new _$MenuCategory._(strCategory: strCategory);
replace(_$result);
return _$result;
}
}
// ignore_for_file: always_put_control_body_on_new_line,always_specify_types,annotate_overrides,avoid_annotating_with_dynamic,avoid_as,avoid_catches_without_on_clauses,avoid_returning_this,lines_longer_than_80_chars,omit_local_variable_types,prefer_expression_function_bodies,sort_constructors_first,test_types_in_equals,unnecessary_const,unnecessary_new
| 0 |
mirrored_repositories/Chi_Food/lib | mirrored_repositories/Chi_Food/lib/model/menuCategory.dart | import 'package:built_value/built_value.dart';
import 'package:built_value/serializer.dart';
part 'menuCategory.g.dart';
abstract class MenuCategory implements Built<MenuCategory,MenuCategoryBuilder>{
static Serializer<MenuCategory> get serializer => _$menuCategorySerializer;
String get strCategory;
MenuCategory._();
factory MenuCategory([void Function(MenuCategoryBuilder) updates]) =_$MenuCategory;
} | 0 |
mirrored_repositories/Chi_Food/lib | mirrored_repositories/Chi_Food/lib/model/locationDetail.g.dart | // GENERATED CODE - DO NOT MODIFY BY HAND
part of 'locationDetail.dart';
// **************************************************************************
// BuiltValueGenerator
// **************************************************************************
Serializer<LocationDetail> _$locationDetailSerializer =
new _$LocationDetailSerializer();
class _$LocationDetailSerializer
implements StructuredSerializer<LocationDetail> {
@override
final Iterable<Type> types = const [LocationDetail, _$LocationDetail];
@override
final String wireName = 'LocationDetail';
@override
Iterable<Object> serialize(Serializers serializers, LocationDetail object,
{FullType specifiedType = FullType.unspecified}) {
final result = <Object>[
'best_rated_restaurant',
serializers.serialize(object.best_rated_restaurant,
specifiedType:
const FullType(BuiltList, const [const FullType(Restaurants)])),
];
return result;
}
@override
LocationDetail deserialize(
Serializers serializers, Iterable<Object> serialized,
{FullType specifiedType = FullType.unspecified}) {
final result = new LocationDetailBuilder();
final iterator = serialized.iterator;
while (iterator.moveNext()) {
final key = iterator.current as String;
iterator.moveNext();
final dynamic value = iterator.current;
switch (key) {
case 'best_rated_restaurant':
result.best_rated_restaurant.replace(serializers.deserialize(value,
specifiedType: const FullType(
BuiltList, const [const FullType(Restaurants)]))
as BuiltList<Object>);
break;
}
}
return result.build();
}
}
class _$LocationDetail extends LocationDetail {
@override
final BuiltList<Restaurants> best_rated_restaurant;
factory _$LocationDetail([void Function(LocationDetailBuilder) updates]) =>
(new LocationDetailBuilder()..update(updates)).build();
_$LocationDetail._({this.best_rated_restaurant}) : super._() {
if (best_rated_restaurant == null) {
throw new BuiltValueNullFieldError(
'LocationDetail', 'best_rated_restaurant');
}
}
@override
LocationDetail rebuild(void Function(LocationDetailBuilder) updates) =>
(toBuilder()..update(updates)).build();
@override
LocationDetailBuilder toBuilder() =>
new LocationDetailBuilder()..replace(this);
@override
bool operator ==(Object other) {
if (identical(other, this)) return true;
return other is LocationDetail &&
best_rated_restaurant == other.best_rated_restaurant;
}
@override
int get hashCode {
return $jf($jc(0, best_rated_restaurant.hashCode));
}
@override
String toString() {
return (newBuiltValueToStringHelper('LocationDetail')
..add('best_rated_restaurant', best_rated_restaurant))
.toString();
}
}
class LocationDetailBuilder
implements Builder<LocationDetail, LocationDetailBuilder> {
_$LocationDetail _$v;
ListBuilder<Restaurants> _best_rated_restaurant;
ListBuilder<Restaurants> get best_rated_restaurant =>
_$this._best_rated_restaurant ??= new ListBuilder<Restaurants>();
set best_rated_restaurant(ListBuilder<Restaurants> best_rated_restaurant) =>
_$this._best_rated_restaurant = best_rated_restaurant;
LocationDetailBuilder();
LocationDetailBuilder get _$this {
if (_$v != null) {
_best_rated_restaurant = _$v.best_rated_restaurant?.toBuilder();
_$v = null;
}
return this;
}
@override
void replace(LocationDetail other) {
if (other == null) {
throw new ArgumentError.notNull('other');
}
_$v = other as _$LocationDetail;
}
@override
void update(void Function(LocationDetailBuilder) updates) {
if (updates != null) updates(this);
}
@override
_$LocationDetail build() {
_$LocationDetail _$result;
try {
_$result = _$v ??
new _$LocationDetail._(
best_rated_restaurant: best_rated_restaurant.build());
} catch (_) {
String _$failedField;
try {
_$failedField = 'best_rated_restaurant';
best_rated_restaurant.build();
} catch (e) {
throw new BuiltValueNestedFieldError(
'LocationDetail', _$failedField, e.toString());
}
rethrow;
}
replace(_$result);
return _$result;
}
}
// ignore_for_file: always_put_control_body_on_new_line,always_specify_types,annotate_overrides,avoid_annotating_with_dynamic,avoid_as,avoid_catches_without_on_clauses,avoid_returning_this,lines_longer_than_80_chars,omit_local_variable_types,prefer_expression_function_bodies,sort_constructors_first,test_types_in_equals,unnecessary_const,unnecessary_new
| 0 |
mirrored_repositories/Chi_Food/lib | mirrored_repositories/Chi_Food/lib/model/dish.g.dart | // GENERATED CODE - DO NOT MODIFY BY HAND
part of 'dish.dart';
// **************************************************************************
// BuiltValueGenerator
// **************************************************************************
Serializer<Dish> _$dishSerializer = new _$DishSerializer();
class _$DishSerializer implements StructuredSerializer<Dish> {
@override
final Iterable<Type> types = const [Dish, _$Dish];
@override
final String wireName = 'Dish';
@override
Iterable<Object> serialize(Serializers serializers, Dish object,
{FullType specifiedType = FullType.unspecified}) {
final result = <Object>[
'dish_id',
serializers.serialize(object.dish_id,
specifiedType: const FullType(String)),
'name',
serializers.serialize(object.name, specifiedType: const FullType(String)),
'price',
serializers.serialize(object.price,
specifiedType: const FullType(String)),
];
return result;
}
@override
Dish deserialize(Serializers serializers, Iterable<Object> serialized,
{FullType specifiedType = FullType.unspecified}) {
final result = new DishBuilder();
final iterator = serialized.iterator;
while (iterator.moveNext()) {
final key = iterator.current as String;
iterator.moveNext();
final dynamic value = iterator.current;
switch (key) {
case 'dish_id':
result.dish_id = serializers.deserialize(value,
specifiedType: const FullType(String)) as String;
break;
case 'name':
result.name = serializers.deserialize(value,
specifiedType: const FullType(String)) as String;
break;
case 'price':
result.price = serializers.deserialize(value,
specifiedType: const FullType(String)) as String;
break;
}
}
return result.build();
}
}
class _$Dish extends Dish {
@override
final String dish_id;
@override
final String name;
@override
final String price;
factory _$Dish([void Function(DishBuilder) updates]) =>
(new DishBuilder()..update(updates)).build();
_$Dish._({this.dish_id, this.name, this.price}) : super._() {
if (dish_id == null) {
throw new BuiltValueNullFieldError('Dish', 'dish_id');
}
if (name == null) {
throw new BuiltValueNullFieldError('Dish', 'name');
}
if (price == null) {
throw new BuiltValueNullFieldError('Dish', 'price');
}
}
@override
Dish rebuild(void Function(DishBuilder) updates) =>
(toBuilder()..update(updates)).build();
@override
DishBuilder toBuilder() => new DishBuilder()..replace(this);
@override
bool operator ==(Object other) {
if (identical(other, this)) return true;
return other is Dish &&
dish_id == other.dish_id &&
name == other.name &&
price == other.price;
}
@override
int get hashCode {
return $jf(
$jc($jc($jc(0, dish_id.hashCode), name.hashCode), price.hashCode));
}
@override
String toString() {
return (newBuiltValueToStringHelper('Dish')
..add('dish_id', dish_id)
..add('name', name)
..add('price', price))
.toString();
}
}
class DishBuilder implements Builder<Dish, DishBuilder> {
_$Dish _$v;
String _dish_id;
String get dish_id => _$this._dish_id;
set dish_id(String dish_id) => _$this._dish_id = dish_id;
String _name;
String get name => _$this._name;
set name(String name) => _$this._name = name;
String _price;
String get price => _$this._price;
set price(String price) => _$this._price = price;
DishBuilder();
DishBuilder get _$this {
if (_$v != null) {
_dish_id = _$v.dish_id;
_name = _$v.name;
_price = _$v.price;
_$v = null;
}
return this;
}
@override
void replace(Dish other) {
if (other == null) {
throw new ArgumentError.notNull('other');
}
_$v = other as _$Dish;
}
@override
void update(void Function(DishBuilder) updates) {
if (updates != null) updates(this);
}
@override
_$Dish build() {
final _$result =
_$v ?? new _$Dish._(dish_id: dish_id, name: name, price: price);
replace(_$result);
return _$result;
}
}
// ignore_for_file: always_put_control_body_on_new_line,always_specify_types,annotate_overrides,avoid_annotating_with_dynamic,avoid_as,avoid_catches_without_on_clauses,avoid_returning_this,lines_longer_than_80_chars,omit_local_variable_types,prefer_expression_function_bodies,sort_constructors_first,test_types_in_equals,unnecessary_const,unnecessary_new
| 0 |
mirrored_repositories/Chi_Food/lib | mirrored_repositories/Chi_Food/lib/model/baseUser.dart |
import 'package:built_value/built_value.dart';
import 'package:built_value/serializer.dart';
part 'baseUser.g.dart';
abstract class BaseUser implements Built<BaseUser,BaseUserBuilder>{
static Serializer<BaseUser> get serializer => _$baseUserSerializer;
@nullable
String get uid;
String get username;
@nullable
String get foodie_level;
@nullable
String get photoUrl;
String get foodie_color;
String get primaryLocation;
int get cityId;
String get entityType;
int get entityId;
String get long;
String get lat;
BaseUser._();
factory BaseUser([void Function(BaseUserBuilder) updates]) =_$BaseUser;
} | 0 |
mirrored_repositories/Chi_Food/lib | mirrored_repositories/Chi_Food/lib/model/locationLocation.dart |
import 'package:built_value/built_value.dart';
import 'package:built_value/serializer.dart';
part 'locationLocation.g.dart';
abstract class LocationLocation implements Built<LocationLocation,LocationLocationBuilder>{
static Serializer<LocationLocation> get serializer => _$locationLocationSerializer;
String get entity_type;
int get entity_id;
String get title;
String get latitude;
String get longitude;
int get city_id;
int get country_id;
String get city_name;
String get country_name;
LocationLocation._();
factory LocationLocation([void Function(LocationLocationBuilder) updates]) =_$LocationLocation;
} | 0 |
mirrored_repositories/Chi_Food/lib | mirrored_repositories/Chi_Food/lib/model/cuisine.g.dart | // GENERATED CODE - DO NOT MODIFY BY HAND
part of 'cuisine.dart';
// **************************************************************************
// BuiltValueGenerator
// **************************************************************************
Serializer<Cuisine> _$cuisineSerializer = new _$CuisineSerializer();
class _$CuisineSerializer implements StructuredSerializer<Cuisine> {
@override
final Iterable<Type> types = const [Cuisine, _$Cuisine];
@override
final String wireName = 'Cuisine';
@override
Iterable<Object> serialize(Serializers serializers, Cuisine object,
{FullType specifiedType = FullType.unspecified}) {
final result = <Object>[
'cuisine_id',
serializers.serialize(object.cuisine_id,
specifiedType: const FullType(int)),
'cuisine_name',
serializers.serialize(object.cuisine_name,
specifiedType: const FullType(String)),
];
return result;
}
@override
Cuisine deserialize(Serializers serializers, Iterable<Object> serialized,
{FullType specifiedType = FullType.unspecified}) {
final result = new CuisineBuilder();
final iterator = serialized.iterator;
while (iterator.moveNext()) {
final key = iterator.current as String;
iterator.moveNext();
final dynamic value = iterator.current;
switch (key) {
case 'cuisine_id':
result.cuisine_id = serializers.deserialize(value,
specifiedType: const FullType(int)) as int;
break;
case 'cuisine_name':
result.cuisine_name = serializers.deserialize(value,
specifiedType: const FullType(String)) as String;
break;
}
}
return result.build();
}
}
class _$Cuisine extends Cuisine {
@override
final int cuisine_id;
@override
final String cuisine_name;
factory _$Cuisine([void Function(CuisineBuilder) updates]) =>
(new CuisineBuilder()..update(updates)).build();
_$Cuisine._({this.cuisine_id, this.cuisine_name}) : super._() {
if (cuisine_id == null) {
throw new BuiltValueNullFieldError('Cuisine', 'cuisine_id');
}
if (cuisine_name == null) {
throw new BuiltValueNullFieldError('Cuisine', 'cuisine_name');
}
}
@override
Cuisine rebuild(void Function(CuisineBuilder) updates) =>
(toBuilder()..update(updates)).build();
@override
CuisineBuilder toBuilder() => new CuisineBuilder()..replace(this);
@override
bool operator ==(Object other) {
if (identical(other, this)) return true;
return other is Cuisine &&
cuisine_id == other.cuisine_id &&
cuisine_name == other.cuisine_name;
}
@override
int get hashCode {
return $jf($jc($jc(0, cuisine_id.hashCode), cuisine_name.hashCode));
}
@override
String toString() {
return (newBuiltValueToStringHelper('Cuisine')
..add('cuisine_id', cuisine_id)
..add('cuisine_name', cuisine_name))
.toString();
}
}
class CuisineBuilder implements Builder<Cuisine, CuisineBuilder> {
_$Cuisine _$v;
int _cuisine_id;
int get cuisine_id => _$this._cuisine_id;
set cuisine_id(int cuisine_id) => _$this._cuisine_id = cuisine_id;
String _cuisine_name;
String get cuisine_name => _$this._cuisine_name;
set cuisine_name(String cuisine_name) => _$this._cuisine_name = cuisine_name;
CuisineBuilder();
CuisineBuilder get _$this {
if (_$v != null) {
_cuisine_id = _$v.cuisine_id;
_cuisine_name = _$v.cuisine_name;
_$v = null;
}
return this;
}
@override
void replace(Cuisine other) {
if (other == null) {
throw new ArgumentError.notNull('other');
}
_$v = other as _$Cuisine;
}
@override
void update(void Function(CuisineBuilder) updates) {
if (updates != null) updates(this);
}
@override
_$Cuisine build() {
final _$result = _$v ??
new _$Cuisine._(cuisine_id: cuisine_id, cuisine_name: cuisine_name);
replace(_$result);
return _$result;
}
}
// ignore_for_file: always_put_control_body_on_new_line,always_specify_types,annotate_overrides,avoid_annotating_with_dynamic,avoid_as,avoid_catches_without_on_clauses,avoid_returning_this,lines_longer_than_80_chars,omit_local_variable_types,prefer_expression_function_bodies,sort_constructors_first,test_types_in_equals,unnecessary_const,unnecessary_new
| 0 |
mirrored_repositories/Chi_Food/lib | mirrored_repositories/Chi_Food/lib/model/category.dart |
import 'package:built_value/built_value.dart';
import 'package:built_value/serializer.dart';
part 'category.g.dart';
abstract class Category implements Built<Category,CategoryBuilder>{
static Serializer<Category> get serializer => _$categorySerializer;
int get id;
String get name;
Category._();
factory Category([void Function(CategoryBuilder) updates]) =_$Category;
} | 0 |
mirrored_repositories/Chi_Food/lib | mirrored_repositories/Chi_Food/lib/model/yelpOpen.dart |
import 'package:built_value/built_value.dart';
import 'package:built_value/serializer.dart';
part 'yelpOpen.g.dart';
abstract class YelpOpen implements Built<YelpOpen,YelpOpenBuilder>{
static Serializer<YelpOpen> get serializer => _$yelpOpenSerializer;
bool get is_overnight;
String get start;
String get end;
String get day;
YelpOpen._();
factory YelpOpen([void Function(YelpOpenBuilder) updates]) =_$YelpOpen;
} | 0 |
mirrored_repositories/Chi_Food/lib | mirrored_repositories/Chi_Food/lib/model/yelpCoordinate.g.dart | // GENERATED CODE - DO NOT MODIFY BY HAND
part of 'yelpCoordinate.dart';
// **************************************************************************
// BuiltValueGenerator
// **************************************************************************
Serializer<YelpCoordinate> _$yelpCoordinateSerializer =
new _$YelpCoordinateSerializer();
class _$YelpCoordinateSerializer
implements StructuredSerializer<YelpCoordinate> {
@override
final Iterable<Type> types = const [YelpCoordinate, _$YelpCoordinate];
@override
final String wireName = 'YelpCoordinate';
@override
Iterable<Object> serialize(Serializers serializers, YelpCoordinate object,
{FullType specifiedType = FullType.unspecified}) {
final result = <Object>[
'latitude',
serializers.serialize(object.latitude,
specifiedType: const FullType(double)),
'longitude',
serializers.serialize(object.longitude,
specifiedType: const FullType(double)),
];
return result;
}
@override
YelpCoordinate deserialize(
Serializers serializers, Iterable<Object> serialized,
{FullType specifiedType = FullType.unspecified}) {
final result = new YelpCoordinateBuilder();
final iterator = serialized.iterator;
while (iterator.moveNext()) {
final key = iterator.current as String;
iterator.moveNext();
final dynamic value = iterator.current;
switch (key) {
case 'latitude':
result.latitude = serializers.deserialize(value,
specifiedType: const FullType(double)) as double;
break;
case 'longitude':
result.longitude = serializers.deserialize(value,
specifiedType: const FullType(double)) as double;
break;
}
}
return result.build();
}
}
class _$YelpCoordinate extends YelpCoordinate {
@override
final double latitude;
@override
final double longitude;
factory _$YelpCoordinate([void Function(YelpCoordinateBuilder) updates]) =>
(new YelpCoordinateBuilder()..update(updates)).build();
_$YelpCoordinate._({this.latitude, this.longitude}) : super._() {
if (latitude == null) {
throw new BuiltValueNullFieldError('YelpCoordinate', 'latitude');
}
if (longitude == null) {
throw new BuiltValueNullFieldError('YelpCoordinate', 'longitude');
}
}
@override
YelpCoordinate rebuild(void Function(YelpCoordinateBuilder) updates) =>
(toBuilder()..update(updates)).build();
@override
YelpCoordinateBuilder toBuilder() =>
new YelpCoordinateBuilder()..replace(this);
@override
bool operator ==(Object other) {
if (identical(other, this)) return true;
return other is YelpCoordinate &&
latitude == other.latitude &&
longitude == other.longitude;
}
@override
int get hashCode {
return $jf($jc($jc(0, latitude.hashCode), longitude.hashCode));
}
@override
String toString() {
return (newBuiltValueToStringHelper('YelpCoordinate')
..add('latitude', latitude)
..add('longitude', longitude))
.toString();
}
}
class YelpCoordinateBuilder
implements Builder<YelpCoordinate, YelpCoordinateBuilder> {
_$YelpCoordinate _$v;
double _latitude;
double get latitude => _$this._latitude;
set latitude(double latitude) => _$this._latitude = latitude;
double _longitude;
double get longitude => _$this._longitude;
set longitude(double longitude) => _$this._longitude = longitude;
YelpCoordinateBuilder();
YelpCoordinateBuilder get _$this {
if (_$v != null) {
_latitude = _$v.latitude;
_longitude = _$v.longitude;
_$v = null;
}
return this;
}
@override
void replace(YelpCoordinate other) {
if (other == null) {
throw new ArgumentError.notNull('other');
}
_$v = other as _$YelpCoordinate;
}
@override
void update(void Function(YelpCoordinateBuilder) updates) {
if (updates != null) updates(this);
}
@override
_$YelpCoordinate build() {
final _$result =
_$v ?? new _$YelpCoordinate._(latitude: latitude, longitude: longitude);
replace(_$result);
return _$result;
}
}
// ignore_for_file: always_put_control_body_on_new_line,always_specify_types,annotate_overrides,avoid_annotating_with_dynamic,avoid_as,avoid_catches_without_on_clauses,avoid_returning_this,lines_longer_than_80_chars,omit_local_variable_types,prefer_expression_function_bodies,sort_constructors_first,test_types_in_equals,unnecessary_const,unnecessary_new
| 0 |
mirrored_repositories/Chi_Food/lib | mirrored_repositories/Chi_Food/lib/model/popularity.g.dart | // GENERATED CODE - DO NOT MODIFY BY HAND
part of 'popularity.dart';
// **************************************************************************
// BuiltValueGenerator
// **************************************************************************
Serializer<Popularity> _$popularitySerializer = new _$PopularitySerializer();
class _$PopularitySerializer implements StructuredSerializer<Popularity> {
@override
final Iterable<Type> types = const [Popularity, _$Popularity];
@override
final String wireName = 'Popularity';
@override
Iterable<Object> serialize(Serializers serializers, Popularity object,
{FullType specifiedType = FullType.unspecified}) {
final result = <Object>[
'popularity',
serializers.serialize(object.popularity,
specifiedType: const FullType(String)),
'nightlife_index',
serializers.serialize(object.nightlife_index,
specifiedType: const FullType(String)),
'top_cuisines',
serializers.serialize(object.top_cuisines,
specifiedType:
const FullType(BuiltList, const [const FullType(String)])),
];
return result;
}
@override
Popularity deserialize(Serializers serializers, Iterable<Object> serialized,
{FullType specifiedType = FullType.unspecified}) {
final result = new PopularityBuilder();
final iterator = serialized.iterator;
while (iterator.moveNext()) {
final key = iterator.current as String;
iterator.moveNext();
final dynamic value = iterator.current;
switch (key) {
case 'popularity':
result.popularity = serializers.deserialize(value,
specifiedType: const FullType(String)) as String;
break;
case 'nightlife_index':
result.nightlife_index = serializers.deserialize(value,
specifiedType: const FullType(String)) as String;
break;
case 'top_cuisines':
result.top_cuisines.replace(serializers.deserialize(value,
specifiedType:
const FullType(BuiltList, const [const FullType(String)]))
as BuiltList<Object>);
break;
}
}
return result.build();
}
}
class _$Popularity extends Popularity {
@override
final String popularity;
@override
final String nightlife_index;
@override
final BuiltList<String> top_cuisines;
factory _$Popularity([void Function(PopularityBuilder) updates]) =>
(new PopularityBuilder()..update(updates)).build();
_$Popularity._({this.popularity, this.nightlife_index, this.top_cuisines})
: super._() {
if (popularity == null) {
throw new BuiltValueNullFieldError('Popularity', 'popularity');
}
if (nightlife_index == null) {
throw new BuiltValueNullFieldError('Popularity', 'nightlife_index');
}
if (top_cuisines == null) {
throw new BuiltValueNullFieldError('Popularity', 'top_cuisines');
}
}
@override
Popularity rebuild(void Function(PopularityBuilder) updates) =>
(toBuilder()..update(updates)).build();
@override
PopularityBuilder toBuilder() => new PopularityBuilder()..replace(this);
@override
bool operator ==(Object other) {
if (identical(other, this)) return true;
return other is Popularity &&
popularity == other.popularity &&
nightlife_index == other.nightlife_index &&
top_cuisines == other.top_cuisines;
}
@override
int get hashCode {
return $jf($jc($jc($jc(0, popularity.hashCode), nightlife_index.hashCode),
top_cuisines.hashCode));
}
@override
String toString() {
return (newBuiltValueToStringHelper('Popularity')
..add('popularity', popularity)
..add('nightlife_index', nightlife_index)
..add('top_cuisines', top_cuisines))
.toString();
}
}
class PopularityBuilder implements Builder<Popularity, PopularityBuilder> {
_$Popularity _$v;
String _popularity;
String get popularity => _$this._popularity;
set popularity(String popularity) => _$this._popularity = popularity;
String _nightlife_index;
String get nightlife_index => _$this._nightlife_index;
set nightlife_index(String nightlife_index) =>
_$this._nightlife_index = nightlife_index;
ListBuilder<String> _top_cuisines;
ListBuilder<String> get top_cuisines =>
_$this._top_cuisines ??= new ListBuilder<String>();
set top_cuisines(ListBuilder<String> top_cuisines) =>
_$this._top_cuisines = top_cuisines;
PopularityBuilder();
PopularityBuilder get _$this {
if (_$v != null) {
_popularity = _$v.popularity;
_nightlife_index = _$v.nightlife_index;
_top_cuisines = _$v.top_cuisines?.toBuilder();
_$v = null;
}
return this;
}
@override
void replace(Popularity other) {
if (other == null) {
throw new ArgumentError.notNull('other');
}
_$v = other as _$Popularity;
}
@override
void update(void Function(PopularityBuilder) updates) {
if (updates != null) updates(this);
}
@override
_$Popularity build() {
_$Popularity _$result;
try {
_$result = _$v ??
new _$Popularity._(
popularity: popularity,
nightlife_index: nightlife_index,
top_cuisines: top_cuisines.build());
} catch (_) {
String _$failedField;
try {
_$failedField = 'top_cuisines';
top_cuisines.build();
} catch (e) {
throw new BuiltValueNestedFieldError(
'Popularity', _$failedField, e.toString());
}
rethrow;
}
replace(_$result);
return _$result;
}
}
// ignore_for_file: always_put_control_body_on_new_line,always_specify_types,annotate_overrides,avoid_annotating_with_dynamic,avoid_as,avoid_catches_without_on_clauses,avoid_returning_this,lines_longer_than_80_chars,omit_local_variable_types,prefer_expression_function_bodies,sort_constructors_first,test_types_in_equals,unnecessary_const,unnecessary_new
| 0 |
mirrored_repositories/Chi_Food/lib | mirrored_repositories/Chi_Food/lib/model/yelpBusiness.g.dart | // GENERATED CODE - DO NOT MODIFY BY HAND
part of 'yelpBusiness.dart';
// **************************************************************************
// BuiltValueGenerator
// **************************************************************************
Serializer<YelpBusiness> _$yelpBusinessSerializer =
new _$YelpBusinessSerializer();
class _$YelpBusinessSerializer implements StructuredSerializer<YelpBusiness> {
@override
final Iterable<Type> types = const [YelpBusiness, _$YelpBusiness];
@override
final String wireName = 'YelpBusiness';
@override
Iterable<Object> serialize(Serializers serializers, YelpBusiness object,
{FullType specifiedType = FullType.unspecified}) {
final result = <Object>[
'id',
serializers.serialize(object.id, specifiedType: const FullType(String)),
'alias',
serializers.serialize(object.alias,
specifiedType: const FullType(String)),
'name',
serializers.serialize(object.name, specifiedType: const FullType(String)),
'image_url',
serializers.serialize(object.image_url,
specifiedType: const FullType(String)),
'phone',
serializers.serialize(object.phone,
specifiedType: const FullType(String)),
'rating',
serializers.serialize(object.rating,
specifiedType: const FullType(double)),
'location',
serializers.serialize(object.location,
specifiedType: const FullType(YelpLocation)),
'coordinates',
serializers.serialize(object.coordinates,
specifiedType: const FullType(YelpCoordinate)),
'photos',
serializers.serialize(object.photos,
specifiedType: const FullType(List, const [const FullType(String)])),
'price',
serializers.serialize(object.price,
specifiedType: const FullType(String)),
];
if (object.open != null) {
result
..add('open')
..add(serializers.serialize(object.open,
specifiedType:
const FullType(BuiltList, const [const FullType(YelpOpen)])));
}
return result;
}
@override
YelpBusiness deserialize(Serializers serializers, Iterable<Object> serialized,
{FullType specifiedType = FullType.unspecified}) {
final result = new YelpBusinessBuilder();
final iterator = serialized.iterator;
while (iterator.moveNext()) {
final key = iterator.current as String;
iterator.moveNext();
final dynamic value = iterator.current;
switch (key) {
case 'id':
result.id = serializers.deserialize(value,
specifiedType: const FullType(String)) as String;
break;
case 'alias':
result.alias = serializers.deserialize(value,
specifiedType: const FullType(String)) as String;
break;
case 'name':
result.name = serializers.deserialize(value,
specifiedType: const FullType(String)) as String;
break;
case 'image_url':
result.image_url = serializers.deserialize(value,
specifiedType: const FullType(String)) as String;
break;
case 'phone':
result.phone = serializers.deserialize(value,
specifiedType: const FullType(String)) as String;
break;
case 'rating':
result.rating = serializers.deserialize(value,
specifiedType: const FullType(double)) as double;
break;
case 'location':
result.location.replace(serializers.deserialize(value,
specifiedType: const FullType(YelpLocation)) as YelpLocation);
break;
case 'coordinates':
result.coordinates.replace(serializers.deserialize(value,
specifiedType: const FullType(YelpCoordinate)) as YelpCoordinate);
break;
case 'photos':
result.photos = serializers.deserialize(value,
specifiedType:
const FullType(List, const [const FullType(String)]))
as List<String>;
break;
case 'price':
result.price = serializers.deserialize(value,
specifiedType: const FullType(String)) as String;
break;
case 'open':
result.open.replace(serializers.deserialize(value,
specifiedType: const FullType(
BuiltList, const [const FullType(YelpOpen)]))
as BuiltList<Object>);
break;
}
}
return result.build();
}
}
class _$YelpBusiness extends YelpBusiness {
@override
final String id;
@override
final String alias;
@override
final String name;
@override
final String image_url;
@override
final String phone;
@override
final double rating;
@override
final YelpLocation location;
@override
final YelpCoordinate coordinates;
@override
final List<String> photos;
@override
final String price;
@override
final BuiltList<YelpOpen> open;
factory _$YelpBusiness([void Function(YelpBusinessBuilder) updates]) =>
(new YelpBusinessBuilder()..update(updates)).build();
_$YelpBusiness._(
{this.id,
this.alias,
this.name,
this.image_url,
this.phone,
this.rating,
this.location,
this.coordinates,
this.photos,
this.price,
this.open})
: super._() {
if (id == null) {
throw new BuiltValueNullFieldError('YelpBusiness', 'id');
}
if (alias == null) {
throw new BuiltValueNullFieldError('YelpBusiness', 'alias');
}
if (name == null) {
throw new BuiltValueNullFieldError('YelpBusiness', 'name');
}
if (image_url == null) {
throw new BuiltValueNullFieldError('YelpBusiness', 'image_url');
}
if (phone == null) {
throw new BuiltValueNullFieldError('YelpBusiness', 'phone');
}
if (rating == null) {
throw new BuiltValueNullFieldError('YelpBusiness', 'rating');
}
if (location == null) {
throw new BuiltValueNullFieldError('YelpBusiness', 'location');
}
if (coordinates == null) {
throw new BuiltValueNullFieldError('YelpBusiness', 'coordinates');
}
if (photos == null) {
throw new BuiltValueNullFieldError('YelpBusiness', 'photos');
}
if (price == null) {
throw new BuiltValueNullFieldError('YelpBusiness', 'price');
}
}
@override
YelpBusiness rebuild(void Function(YelpBusinessBuilder) updates) =>
(toBuilder()..update(updates)).build();
@override
YelpBusinessBuilder toBuilder() => new YelpBusinessBuilder()..replace(this);
@override
bool operator ==(Object other) {
if (identical(other, this)) return true;
return other is YelpBusiness &&
id == other.id &&
alias == other.alias &&
name == other.name &&
image_url == other.image_url &&
phone == other.phone &&
rating == other.rating &&
location == other.location &&
coordinates == other.coordinates &&
photos == other.photos &&
price == other.price &&
open == other.open;
}
@override
int get hashCode {
return $jf($jc(
$jc(
$jc(
$jc(
$jc(
$jc(
$jc(
$jc(
$jc(
$jc($jc(0, id.hashCode),
alias.hashCode),
name.hashCode),
image_url.hashCode),
phone.hashCode),
rating.hashCode),
location.hashCode),
coordinates.hashCode),
photos.hashCode),
price.hashCode),
open.hashCode));
}
@override
String toString() {
return (newBuiltValueToStringHelper('YelpBusiness')
..add('id', id)
..add('alias', alias)
..add('name', name)
..add('image_url', image_url)
..add('phone', phone)
..add('rating', rating)
..add('location', location)
..add('coordinates', coordinates)
..add('photos', photos)
..add('price', price)
..add('open', open))
.toString();
}
}
class YelpBusinessBuilder
implements Builder<YelpBusiness, YelpBusinessBuilder> {
_$YelpBusiness _$v;
String _id;
String get id => _$this._id;
set id(String id) => _$this._id = id;
String _alias;
String get alias => _$this._alias;
set alias(String alias) => _$this._alias = alias;
String _name;
String get name => _$this._name;
set name(String name) => _$this._name = name;
String _image_url;
String get image_url => _$this._image_url;
set image_url(String image_url) => _$this._image_url = image_url;
String _phone;
String get phone => _$this._phone;
set phone(String phone) => _$this._phone = phone;
double _rating;
double get rating => _$this._rating;
set rating(double rating) => _$this._rating = rating;
YelpLocationBuilder _location;
YelpLocationBuilder get location =>
_$this._location ??= new YelpLocationBuilder();
set location(YelpLocationBuilder location) => _$this._location = location;
YelpCoordinateBuilder _coordinates;
YelpCoordinateBuilder get coordinates =>
_$this._coordinates ??= new YelpCoordinateBuilder();
set coordinates(YelpCoordinateBuilder coordinates) =>
_$this._coordinates = coordinates;
List<String> _photos;
List<String> get photos => _$this._photos;
set photos(List<String> photos) => _$this._photos = photos;
String _price;
String get price => _$this._price;
set price(String price) => _$this._price = price;
ListBuilder<YelpOpen> _open;
ListBuilder<YelpOpen> get open =>
_$this._open ??= new ListBuilder<YelpOpen>();
set open(ListBuilder<YelpOpen> open) => _$this._open = open;
YelpBusinessBuilder();
YelpBusinessBuilder get _$this {
if (_$v != null) {
_id = _$v.id;
_alias = _$v.alias;
_name = _$v.name;
_image_url = _$v.image_url;
_phone = _$v.phone;
_rating = _$v.rating;
_location = _$v.location?.toBuilder();
_coordinates = _$v.coordinates?.toBuilder();
_photos = _$v.photos;
_price = _$v.price;
_open = _$v.open?.toBuilder();
_$v = null;
}
return this;
}
@override
void replace(YelpBusiness other) {
if (other == null) {
throw new ArgumentError.notNull('other');
}
_$v = other as _$YelpBusiness;
}
@override
void update(void Function(YelpBusinessBuilder) updates) {
if (updates != null) updates(this);
}
@override
_$YelpBusiness build() {
_$YelpBusiness _$result;
try {
_$result = _$v ??
new _$YelpBusiness._(
id: id,
alias: alias,
name: name,
image_url: image_url,
phone: phone,
rating: rating,
location: location.build(),
coordinates: coordinates.build(),
photos: photos,
price: price,
open: _open?.build());
} catch (_) {
String _$failedField;
try {
_$failedField = 'location';
location.build();
_$failedField = 'coordinates';
coordinates.build();
_$failedField = 'open';
_open?.build();
} catch (e) {
throw new BuiltValueNestedFieldError(
'YelpBusiness', _$failedField, e.toString());
}
rethrow;
}
replace(_$result);
return _$result;
}
}
// ignore_for_file: always_put_control_body_on_new_line,always_specify_types,annotate_overrides,avoid_annotating_with_dynamic,avoid_as,avoid_catches_without_on_clauses,avoid_returning_this,lines_longer_than_80_chars,omit_local_variable_types,prefer_expression_function_bodies,sort_constructors_first,test_types_in_equals,unnecessary_const,unnecessary_new
| 0 |
mirrored_repositories/Chi_Food/lib | mirrored_repositories/Chi_Food/lib/model/yelpLocation.dart | import 'package:built_value/built_value.dart';
import 'package:built_value/serializer.dart';
part 'yelpLocation.g.dart';
abstract class YelpLocation implements Built<YelpLocation,YelpLocationBuilder>{
static Serializer<YelpLocation> get serializer => _$yelpLocationSerializer;
String get address1;
String get city;
String get zip_code;
String get country;
List<String> get display_address;
YelpLocation._();
factory YelpLocation([void Function(YelpLocationBuilder) updates]) =_$YelpLocation;
} | 0 |
mirrored_repositories/Chi_Food/lib | mirrored_repositories/Chi_Food/lib/model/userRating.g.dart | // GENERATED CODE - DO NOT MODIFY BY HAND
part of 'userRating.dart';
// **************************************************************************
// BuiltValueGenerator
// **************************************************************************
Serializer<UserRating> _$userRatingSerializer = new _$UserRatingSerializer();
class _$UserRatingSerializer implements StructuredSerializer<UserRating> {
@override
final Iterable<Type> types = const [UserRating, _$UserRating];
@override
final String wireName = 'UserRating';
@override
Iterable<Object> serialize(Serializers serializers, UserRating object,
{FullType specifiedType = FullType.unspecified}) {
final result = <Object>[
'aggregate_rating',
serializers.serialize(object.aggregate_rating,
specifiedType: const FullType(String)),
'rating_text',
serializers.serialize(object.rating_text,
specifiedType: const FullType(String)),
'rating_color',
serializers.serialize(object.rating_color,
specifiedType: const FullType(String)),
'votes',
serializers.serialize(object.votes,
specifiedType: const FullType(String)),
];
return result;
}
@override
UserRating deserialize(Serializers serializers, Iterable<Object> serialized,
{FullType specifiedType = FullType.unspecified}) {
final result = new UserRatingBuilder();
final iterator = serialized.iterator;
while (iterator.moveNext()) {
final key = iterator.current as String;
iterator.moveNext();
final dynamic value = iterator.current;
switch (key) {
case 'aggregate_rating':
result.aggregate_rating = serializers.deserialize(value,
specifiedType: const FullType(String)) as String;
break;
case 'rating_text':
result.rating_text = serializers.deserialize(value,
specifiedType: const FullType(String)) as String;
break;
case 'rating_color':
result.rating_color = serializers.deserialize(value,
specifiedType: const FullType(String)) as String;
break;
case 'votes':
result.votes = serializers.deserialize(value,
specifiedType: const FullType(String)) as String;
break;
}
}
return result.build();
}
}
class _$UserRating extends UserRating {
@override
final String aggregate_rating;
@override
final String rating_text;
@override
final String rating_color;
@override
final String votes;
factory _$UserRating([void Function(UserRatingBuilder) updates]) =>
(new UserRatingBuilder()..update(updates)).build();
_$UserRating._(
{this.aggregate_rating, this.rating_text, this.rating_color, this.votes})
: super._() {
if (aggregate_rating == null) {
throw new BuiltValueNullFieldError('UserRating', 'aggregate_rating');
}
if (rating_text == null) {
throw new BuiltValueNullFieldError('UserRating', 'rating_text');
}
if (rating_color == null) {
throw new BuiltValueNullFieldError('UserRating', 'rating_color');
}
if (votes == null) {
throw new BuiltValueNullFieldError('UserRating', 'votes');
}
}
@override
UserRating rebuild(void Function(UserRatingBuilder) updates) =>
(toBuilder()..update(updates)).build();
@override
UserRatingBuilder toBuilder() => new UserRatingBuilder()..replace(this);
@override
bool operator ==(Object other) {
if (identical(other, this)) return true;
return other is UserRating &&
aggregate_rating == other.aggregate_rating &&
rating_text == other.rating_text &&
rating_color == other.rating_color &&
votes == other.votes;
}
@override
int get hashCode {
return $jf($jc(
$jc($jc($jc(0, aggregate_rating.hashCode), rating_text.hashCode),
rating_color.hashCode),
votes.hashCode));
}
@override
String toString() {
return (newBuiltValueToStringHelper('UserRating')
..add('aggregate_rating', aggregate_rating)
..add('rating_text', rating_text)
..add('rating_color', rating_color)
..add('votes', votes))
.toString();
}
}
class UserRatingBuilder implements Builder<UserRating, UserRatingBuilder> {
_$UserRating _$v;
String _aggregate_rating;
String get aggregate_rating => _$this._aggregate_rating;
set aggregate_rating(String aggregate_rating) =>
_$this._aggregate_rating = aggregate_rating;
String _rating_text;
String get rating_text => _$this._rating_text;
set rating_text(String rating_text) => _$this._rating_text = rating_text;
String _rating_color;
String get rating_color => _$this._rating_color;
set rating_color(String rating_color) => _$this._rating_color = rating_color;
String _votes;
String get votes => _$this._votes;
set votes(String votes) => _$this._votes = votes;
UserRatingBuilder();
UserRatingBuilder get _$this {
if (_$v != null) {
_aggregate_rating = _$v.aggregate_rating;
_rating_text = _$v.rating_text;
_rating_color = _$v.rating_color;
_votes = _$v.votes;
_$v = null;
}
return this;
}
@override
void replace(UserRating other) {
if (other == null) {
throw new ArgumentError.notNull('other');
}
_$v = other as _$UserRating;
}
@override
void update(void Function(UserRatingBuilder) updates) {
if (updates != null) updates(this);
}
@override
_$UserRating build() {
final _$result = _$v ??
new _$UserRating._(
aggregate_rating: aggregate_rating,
rating_text: rating_text,
rating_color: rating_color,
votes: votes);
replace(_$result);
return _$result;
}
}
// ignore_for_file: always_put_control_body_on_new_line,always_specify_types,annotate_overrides,avoid_annotating_with_dynamic,avoid_as,avoid_catches_without_on_clauses,avoid_returning_this,lines_longer_than_80_chars,omit_local_variable_types,prefer_expression_function_bodies,sort_constructors_first,test_types_in_equals,unnecessary_const,unnecessary_new
| 0 |
mirrored_repositories/Chi_Food/lib | mirrored_repositories/Chi_Food/lib/model/category.g.dart | // GENERATED CODE - DO NOT MODIFY BY HAND
part of 'category.dart';
// **************************************************************************
// BuiltValueGenerator
// **************************************************************************
Serializer<Category> _$categorySerializer = new _$CategorySerializer();
class _$CategorySerializer implements StructuredSerializer<Category> {
@override
final Iterable<Type> types = const [Category, _$Category];
@override
final String wireName = 'Category';
@override
Iterable<Object> serialize(Serializers serializers, Category object,
{FullType specifiedType = FullType.unspecified}) {
final result = <Object>[
'id',
serializers.serialize(object.id, specifiedType: const FullType(int)),
'name',
serializers.serialize(object.name, specifiedType: const FullType(String)),
];
return result;
}
@override
Category deserialize(Serializers serializers, Iterable<Object> serialized,
{FullType specifiedType = FullType.unspecified}) {
final result = new CategoryBuilder();
final iterator = serialized.iterator;
while (iterator.moveNext()) {
final key = iterator.current as String;
iterator.moveNext();
final dynamic value = iterator.current;
switch (key) {
case 'id':
result.id = serializers.deserialize(value,
specifiedType: const FullType(int)) as int;
break;
case 'name':
result.name = serializers.deserialize(value,
specifiedType: const FullType(String)) as String;
break;
}
}
return result.build();
}
}
class _$Category extends Category {
@override
final int id;
@override
final String name;
factory _$Category([void Function(CategoryBuilder) updates]) =>
(new CategoryBuilder()..update(updates)).build();
_$Category._({this.id, this.name}) : super._() {
if (id == null) {
throw new BuiltValueNullFieldError('Category', 'id');
}
if (name == null) {
throw new BuiltValueNullFieldError('Category', 'name');
}
}
@override
Category rebuild(void Function(CategoryBuilder) updates) =>
(toBuilder()..update(updates)).build();
@override
CategoryBuilder toBuilder() => new CategoryBuilder()..replace(this);
@override
bool operator ==(Object other) {
if (identical(other, this)) return true;
return other is Category && id == other.id && name == other.name;
}
@override
int get hashCode {
return $jf($jc($jc(0, id.hashCode), name.hashCode));
}
@override
String toString() {
return (newBuiltValueToStringHelper('Category')
..add('id', id)
..add('name', name))
.toString();
}
}
class CategoryBuilder implements Builder<Category, CategoryBuilder> {
_$Category _$v;
int _id;
int get id => _$this._id;
set id(int id) => _$this._id = id;
String _name;
String get name => _$this._name;
set name(String name) => _$this._name = name;
CategoryBuilder();
CategoryBuilder get _$this {
if (_$v != null) {
_id = _$v.id;
_name = _$v.name;
_$v = null;
}
return this;
}
@override
void replace(Category other) {
if (other == null) {
throw new ArgumentError.notNull('other');
}
_$v = other as _$Category;
}
@override
void update(void Function(CategoryBuilder) updates) {
if (updates != null) updates(this);
}
@override
_$Category build() {
final _$result = _$v ?? new _$Category._(id: id, name: name);
replace(_$result);
return _$result;
}
}
// ignore_for_file: always_put_control_body_on_new_line,always_specify_types,annotate_overrides,avoid_annotating_with_dynamic,avoid_as,avoid_catches_without_on_clauses,avoid_returning_this,lines_longer_than_80_chars,omit_local_variable_types,prefer_expression_function_bodies,sort_constructors_first,test_types_in_equals,unnecessary_const,unnecessary_new
| 0 |
mirrored_repositories/Chi_Food/lib | mirrored_repositories/Chi_Food/lib/model/orderItem.g.dart | // GENERATED CODE - DO NOT MODIFY BY HAND
part of 'orderItem.dart';
// **************************************************************************
// BuiltValueGenerator
// **************************************************************************
Serializer<OrderItem> _$orderItemSerializer = new _$OrderItemSerializer();
class _$OrderItemSerializer implements StructuredSerializer<OrderItem> {
@override
final Iterable<Type> types = const [OrderItem, _$OrderItem];
@override
final String wireName = 'OrderItem';
@override
Iterable<Object> serialize(Serializers serializers, OrderItem object,
{FullType specifiedType = FullType.unspecified}) {
final result = <Object>[
'strMeal',
serializers.serialize(object.strMeal,
specifiedType: const FullType(String)),
'strMealThumb',
serializers.serialize(object.strMealThumb,
specifiedType: const FullType(String)),
'idMeal',
serializers.serialize(object.idMeal,
specifiedType: const FullType(String)),
'price',
serializers.serialize(object.price,
specifiedType: const FullType(double)),
'count',
serializers.serialize(object.count, specifiedType: const FullType(int)),
];
if (object.id != null) {
result
..add('id')
..add(serializers.serialize(object.id,
specifiedType: const FullType(String)));
}
if (object.restaurant != null) {
result
..add('restaurant')
..add(serializers.serialize(object.restaurant,
specifiedType: const FullType(Restaurants)));
}
return result;
}
@override
OrderItem deserialize(Serializers serializers, Iterable<Object> serialized,
{FullType specifiedType = FullType.unspecified}) {
final result = new OrderItemBuilder();
final iterator = serialized.iterator;
while (iterator.moveNext()) {
final key = iterator.current as String;
iterator.moveNext();
final dynamic value = iterator.current;
switch (key) {
case 'id':
result.id = serializers.deserialize(value,
specifiedType: const FullType(String)) as String;
break;
case 'strMeal':
result.strMeal = serializers.deserialize(value,
specifiedType: const FullType(String)) as String;
break;
case 'strMealThumb':
result.strMealThumb = serializers.deserialize(value,
specifiedType: const FullType(String)) as String;
break;
case 'idMeal':
result.idMeal = serializers.deserialize(value,
specifiedType: const FullType(String)) as String;
break;
case 'price':
result.price = serializers.deserialize(value,
specifiedType: const FullType(double)) as double;
break;
case 'count':
result.count = serializers.deserialize(value,
specifiedType: const FullType(int)) as int;
break;
case 'restaurant':
result.restaurant.replace(serializers.deserialize(value,
specifiedType: const FullType(Restaurants)) as Restaurants);
break;
}
}
return result.build();
}
}
class _$OrderItem extends OrderItem {
@override
final String id;
@override
final String strMeal;
@override
final String strMealThumb;
@override
final String idMeal;
@override
final double price;
@override
final int count;
@override
final Restaurants restaurant;
factory _$OrderItem([void Function(OrderItemBuilder) updates]) =>
(new OrderItemBuilder()..update(updates)).build();
_$OrderItem._(
{this.id,
this.strMeal,
this.strMealThumb,
this.idMeal,
this.price,
this.count,
this.restaurant})
: super._() {
if (strMeal == null) {
throw new BuiltValueNullFieldError('OrderItem', 'strMeal');
}
if (strMealThumb == null) {
throw new BuiltValueNullFieldError('OrderItem', 'strMealThumb');
}
if (idMeal == null) {
throw new BuiltValueNullFieldError('OrderItem', 'idMeal');
}
if (price == null) {
throw new BuiltValueNullFieldError('OrderItem', 'price');
}
if (count == null) {
throw new BuiltValueNullFieldError('OrderItem', 'count');
}
}
@override
OrderItem rebuild(void Function(OrderItemBuilder) updates) =>
(toBuilder()..update(updates)).build();
@override
OrderItemBuilder toBuilder() => new OrderItemBuilder()..replace(this);
@override
bool operator ==(Object other) {
if (identical(other, this)) return true;
return other is OrderItem &&
id == other.id &&
strMeal == other.strMeal &&
strMealThumb == other.strMealThumb &&
idMeal == other.idMeal &&
price == other.price &&
count == other.count &&
restaurant == other.restaurant;
}
@override
int get hashCode {
return $jf($jc(
$jc(
$jc(
$jc(
$jc($jc($jc(0, id.hashCode), strMeal.hashCode),
strMealThumb.hashCode),
idMeal.hashCode),
price.hashCode),
count.hashCode),
restaurant.hashCode));
}
@override
String toString() {
return (newBuiltValueToStringHelper('OrderItem')
..add('id', id)
..add('strMeal', strMeal)
..add('strMealThumb', strMealThumb)
..add('idMeal', idMeal)
..add('price', price)
..add('count', count)
..add('restaurant', restaurant))
.toString();
}
}
class OrderItemBuilder implements Builder<OrderItem, OrderItemBuilder> {
_$OrderItem _$v;
String _id;
String get id => _$this._id;
set id(String id) => _$this._id = id;
String _strMeal;
String get strMeal => _$this._strMeal;
set strMeal(String strMeal) => _$this._strMeal = strMeal;
String _strMealThumb;
String get strMealThumb => _$this._strMealThumb;
set strMealThumb(String strMealThumb) => _$this._strMealThumb = strMealThumb;
String _idMeal;
String get idMeal => _$this._idMeal;
set idMeal(String idMeal) => _$this._idMeal = idMeal;
double _price;
double get price => _$this._price;
set price(double price) => _$this._price = price;
int _count;
int get count => _$this._count;
set count(int count) => _$this._count = count;
RestaurantsBuilder _restaurant;
RestaurantsBuilder get restaurant =>
_$this._restaurant ??= new RestaurantsBuilder();
set restaurant(RestaurantsBuilder restaurant) =>
_$this._restaurant = restaurant;
OrderItemBuilder();
OrderItemBuilder get _$this {
if (_$v != null) {
_id = _$v.id;
_strMeal = _$v.strMeal;
_strMealThumb = _$v.strMealThumb;
_idMeal = _$v.idMeal;
_price = _$v.price;
_count = _$v.count;
_restaurant = _$v.restaurant?.toBuilder();
_$v = null;
}
return this;
}
@override
void replace(OrderItem other) {
if (other == null) {
throw new ArgumentError.notNull('other');
}
_$v = other as _$OrderItem;
}
@override
void update(void Function(OrderItemBuilder) updates) {
if (updates != null) updates(this);
}
@override
_$OrderItem build() {
_$OrderItem _$result;
try {
_$result = _$v ??
new _$OrderItem._(
id: id,
strMeal: strMeal,
strMealThumb: strMealThumb,
idMeal: idMeal,
price: price,
count: count,
restaurant: _restaurant?.build());
} catch (_) {
String _$failedField;
try {
_$failedField = 'restaurant';
_restaurant?.build();
} catch (e) {
throw new BuiltValueNestedFieldError(
'OrderItem', _$failedField, e.toString());
}
rethrow;
}
replace(_$result);
return _$result;
}
}
// ignore_for_file: always_put_control_body_on_new_line,always_specify_types,annotate_overrides,avoid_annotating_with_dynamic,avoid_as,avoid_catches_without_on_clauses,avoid_returning_this,lines_longer_than_80_chars,omit_local_variable_types,prefer_expression_function_bodies,sort_constructors_first,test_types_in_equals,unnecessary_const,unnecessary_new
| 0 |
mirrored_repositories/Chi_Food/lib | mirrored_repositories/Chi_Food/lib/model/yelpOpen.g.dart | // GENERATED CODE - DO NOT MODIFY BY HAND
part of 'yelpOpen.dart';
// **************************************************************************
// BuiltValueGenerator
// **************************************************************************
Serializer<YelpOpen> _$yelpOpenSerializer = new _$YelpOpenSerializer();
class _$YelpOpenSerializer implements StructuredSerializer<YelpOpen> {
@override
final Iterable<Type> types = const [YelpOpen, _$YelpOpen];
@override
final String wireName = 'YelpOpen';
@override
Iterable<Object> serialize(Serializers serializers, YelpOpen object,
{FullType specifiedType = FullType.unspecified}) {
final result = <Object>[
'is_overnight',
serializers.serialize(object.is_overnight,
specifiedType: const FullType(bool)),
'start',
serializers.serialize(object.start,
specifiedType: const FullType(String)),
'end',
serializers.serialize(object.end, specifiedType: const FullType(String)),
'day',
serializers.serialize(object.day, specifiedType: const FullType(String)),
];
return result;
}
@override
YelpOpen deserialize(Serializers serializers, Iterable<Object> serialized,
{FullType specifiedType = FullType.unspecified}) {
final result = new YelpOpenBuilder();
final iterator = serialized.iterator;
while (iterator.moveNext()) {
final key = iterator.current as String;
iterator.moveNext();
final dynamic value = iterator.current;
switch (key) {
case 'is_overnight':
result.is_overnight = serializers.deserialize(value,
specifiedType: const FullType(bool)) as bool;
break;
case 'start':
result.start = serializers.deserialize(value,
specifiedType: const FullType(String)) as String;
break;
case 'end':
result.end = serializers.deserialize(value,
specifiedType: const FullType(String)) as String;
break;
case 'day':
result.day = serializers.deserialize(value,
specifiedType: const FullType(String)) as String;
break;
}
}
return result.build();
}
}
class _$YelpOpen extends YelpOpen {
@override
final bool is_overnight;
@override
final String start;
@override
final String end;
@override
final String day;
factory _$YelpOpen([void Function(YelpOpenBuilder) updates]) =>
(new YelpOpenBuilder()..update(updates)).build();
_$YelpOpen._({this.is_overnight, this.start, this.end, this.day})
: super._() {
if (is_overnight == null) {
throw new BuiltValueNullFieldError('YelpOpen', 'is_overnight');
}
if (start == null) {
throw new BuiltValueNullFieldError('YelpOpen', 'start');
}
if (end == null) {
throw new BuiltValueNullFieldError('YelpOpen', 'end');
}
if (day == null) {
throw new BuiltValueNullFieldError('YelpOpen', 'day');
}
}
@override
YelpOpen rebuild(void Function(YelpOpenBuilder) updates) =>
(toBuilder()..update(updates)).build();
@override
YelpOpenBuilder toBuilder() => new YelpOpenBuilder()..replace(this);
@override
bool operator ==(Object other) {
if (identical(other, this)) return true;
return other is YelpOpen &&
is_overnight == other.is_overnight &&
start == other.start &&
end == other.end &&
day == other.day;
}
@override
int get hashCode {
return $jf($jc(
$jc($jc($jc(0, is_overnight.hashCode), start.hashCode), end.hashCode),
day.hashCode));
}
@override
String toString() {
return (newBuiltValueToStringHelper('YelpOpen')
..add('is_overnight', is_overnight)
..add('start', start)
..add('end', end)
..add('day', day))
.toString();
}
}
class YelpOpenBuilder implements Builder<YelpOpen, YelpOpenBuilder> {
_$YelpOpen _$v;
bool _is_overnight;
bool get is_overnight => _$this._is_overnight;
set is_overnight(bool is_overnight) => _$this._is_overnight = is_overnight;
String _start;
String get start => _$this._start;
set start(String start) => _$this._start = start;
String _end;
String get end => _$this._end;
set end(String end) => _$this._end = end;
String _day;
String get day => _$this._day;
set day(String day) => _$this._day = day;
YelpOpenBuilder();
YelpOpenBuilder get _$this {
if (_$v != null) {
_is_overnight = _$v.is_overnight;
_start = _$v.start;
_end = _$v.end;
_day = _$v.day;
_$v = null;
}
return this;
}
@override
void replace(YelpOpen other) {
if (other == null) {
throw new ArgumentError.notNull('other');
}
_$v = other as _$YelpOpen;
}
@override
void update(void Function(YelpOpenBuilder) updates) {
if (updates != null) updates(this);
}
@override
_$YelpOpen build() {
final _$result = _$v ??
new _$YelpOpen._(
is_overnight: is_overnight, start: start, end: end, day: day);
replace(_$result);
return _$result;
}
}
// ignore_for_file: always_put_control_body_on_new_line,always_specify_types,annotate_overrides,avoid_annotating_with_dynamic,avoid_as,avoid_catches_without_on_clauses,avoid_returning_this,lines_longer_than_80_chars,omit_local_variable_types,prefer_expression_function_bodies,sort_constructors_first,test_types_in_equals,unnecessary_const,unnecessary_new
| 0 |
mirrored_repositories/Chi_Food/lib | mirrored_repositories/Chi_Food/lib/model/dish.dart | import 'package:built_value/built_value.dart';
import 'package:built_value/serializer.dart';
part 'dish.g.dart';
abstract class Dish implements Built<Dish,DishBuilder>{
static Serializer<Dish> get serializer => _$dishSerializer;
String get dish_id;
String get name;
String get price;
Dish._();
factory Dish([void Function(DishBuilder) updates]) =_$Dish;
} | 0 |
mirrored_repositories/Chi_Food/lib | mirrored_repositories/Chi_Food/lib/model/cuisine.dart |
import 'package:built_value/built_value.dart';
import 'package:built_value/serializer.dart';
part 'cuisine.g.dart';
abstract class Cuisine implements Built<Cuisine,CuisineBuilder>{
static Serializer<Cuisine> get serializer => _$cuisineSerializer;
int get cuisine_id;
String get cuisine_name;
Cuisine._();
factory Cuisine([void Function(CuisineBuilder) updates]) =_$Cuisine;
} | 0 |
mirrored_repositories/Chi_Food/lib | mirrored_repositories/Chi_Food/lib/model/serializer.g.dart | // GENERATED CODE - DO NOT MODIFY BY HAND
part of 'serializer.dart';
// **************************************************************************
// BuiltValueGenerator
// **************************************************************************
Serializers _$serializer = (new Serializers().toBuilder()
..add(BaseUser.serializer)
..add(Category.serializer)
..add(Cuisine.serializer)
..add(DailyMenu.serializer)
..add(Dish.serializer)
..add(Establishment.serializer)
..add(GeoLocation.serializer)
..add(Location.serializer)
..add(LocationDetail.serializer)
..add(LocationLocation.serializer)
..add(MenuCategory.serializer)
..add(MenuItem.serializer)
..add(Photo.serializer)
..add(Popularity.serializer)
..add(Restaurants.serializer)
..add(Review.serializer)
..add(ReviewUser.serializer)
..add(SearchResult.serializer)
..add(UserRating.serializer)
..add(YelpBusiness.serializer)
..add(YelpCoordinate.serializer)
..add(YelpLocation.serializer)
..add(YelpOpen.serializer)
..add(YelpReview.serializer)
..add(YelpUser.serializer)
..addBuilderFactory(
const FullType(BuiltList, const [const FullType(Dish)]),
() => new ListBuilder<Dish>())
..addBuilderFactory(
const FullType(BuiltList, const [const FullType(Photo)]),
() => new ListBuilder<Photo>())
..addBuilderFactory(
const FullType(BuiltList, const [const FullType(Restaurants)]),
() => new ListBuilder<Restaurants>())
..addBuilderFactory(
const FullType(BuiltList, const [const FullType(Restaurants)]),
() => new ListBuilder<Restaurants>())
..addBuilderFactory(
const FullType(BuiltList, const [const FullType(Restaurants)]),
() => new ListBuilder<Restaurants>())
..addBuilderFactory(
const FullType(BuiltList, const [const FullType(String)]),
() => new ListBuilder<String>())
..addBuilderFactory(
const FullType(BuiltList, const [const FullType(YelpOpen)]),
() => new ListBuilder<YelpOpen>()))
.build();
// ignore_for_file: always_put_control_body_on_new_line,always_specify_types,annotate_overrides,avoid_annotating_with_dynamic,avoid_as,avoid_catches_without_on_clauses,avoid_returning_this,lines_longer_than_80_chars,omit_local_variable_types,prefer_expression_function_bodies,sort_constructors_first,test_types_in_equals,unnecessary_const,unnecessary_new
| 0 |
mirrored_repositories/Chi_Food/lib | mirrored_repositories/Chi_Food/lib/model/location.g.dart | // GENERATED CODE - DO NOT MODIFY BY HAND
part of 'location.dart';
// **************************************************************************
// BuiltValueGenerator
// **************************************************************************
Serializer<Location> _$locationSerializer = new _$LocationSerializer();
class _$LocationSerializer implements StructuredSerializer<Location> {
@override
final Iterable<Type> types = const [Location, _$Location];
@override
final String wireName = 'Location';
@override
Iterable<Object> serialize(Serializers serializers, Location object,
{FullType specifiedType = FullType.unspecified}) {
final result = <Object>[
'latitude',
serializers.serialize(object.latitude,
specifiedType: const FullType(String)),
'longitude',
serializers.serialize(object.longitude,
specifiedType: const FullType(String)),
'zipcode',
serializers.serialize(object.zipcode,
specifiedType: const FullType(String)),
'country_id',
serializers.serialize(object.country_id,
specifiedType: const FullType(num)),
];
if (object.locality != null) {
result
..add('locality')
..add(serializers.serialize(object.locality,
specifiedType: const FullType(String)));
}
if (object.address != null) {
result
..add('address')
..add(serializers.serialize(object.address,
specifiedType: const FullType(String)));
}
if (object.city != null) {
result
..add('city')
..add(serializers.serialize(object.city,
specifiedType: const FullType(String)));
}
return result;
}
@override
Location deserialize(Serializers serializers, Iterable<Object> serialized,
{FullType specifiedType = FullType.unspecified}) {
final result = new LocationBuilder();
final iterator = serialized.iterator;
while (iterator.moveNext()) {
final key = iterator.current as String;
iterator.moveNext();
final dynamic value = iterator.current;
switch (key) {
case 'locality':
result.locality = serializers.deserialize(value,
specifiedType: const FullType(String)) as String;
break;
case 'address':
result.address = serializers.deserialize(value,
specifiedType: const FullType(String)) as String;
break;
case 'city':
result.city = serializers.deserialize(value,
specifiedType: const FullType(String)) as String;
break;
case 'latitude':
result.latitude = serializers.deserialize(value,
specifiedType: const FullType(String)) as String;
break;
case 'longitude':
result.longitude = serializers.deserialize(value,
specifiedType: const FullType(String)) as String;
break;
case 'zipcode':
result.zipcode = serializers.deserialize(value,
specifiedType: const FullType(String)) as String;
break;
case 'country_id':
result.country_id = serializers.deserialize(value,
specifiedType: const FullType(num)) as num;
break;
}
}
return result.build();
}
}
class _$Location extends Location {
@override
final String locality;
@override
final String address;
@override
final String city;
@override
final String latitude;
@override
final String longitude;
@override
final String zipcode;
@override
final num country_id;
factory _$Location([void Function(LocationBuilder) updates]) =>
(new LocationBuilder()..update(updates)).build();
_$Location._(
{this.locality,
this.address,
this.city,
this.latitude,
this.longitude,
this.zipcode,
this.country_id})
: super._() {
if (latitude == null) {
throw new BuiltValueNullFieldError('Location', 'latitude');
}
if (longitude == null) {
throw new BuiltValueNullFieldError('Location', 'longitude');
}
if (zipcode == null) {
throw new BuiltValueNullFieldError('Location', 'zipcode');
}
if (country_id == null) {
throw new BuiltValueNullFieldError('Location', 'country_id');
}
}
@override
Location rebuild(void Function(LocationBuilder) updates) =>
(toBuilder()..update(updates)).build();
@override
LocationBuilder toBuilder() => new LocationBuilder()..replace(this);
@override
bool operator ==(Object other) {
if (identical(other, this)) return true;
return other is Location &&
locality == other.locality &&
address == other.address &&
city == other.city &&
latitude == other.latitude &&
longitude == other.longitude &&
zipcode == other.zipcode &&
country_id == other.country_id;
}
@override
int get hashCode {
return $jf($jc(
$jc(
$jc(
$jc(
$jc($jc($jc(0, locality.hashCode), address.hashCode),
city.hashCode),
latitude.hashCode),
longitude.hashCode),
zipcode.hashCode),
country_id.hashCode));
}
@override
String toString() {
return (newBuiltValueToStringHelper('Location')
..add('locality', locality)
..add('address', address)
..add('city', city)
..add('latitude', latitude)
..add('longitude', longitude)
..add('zipcode', zipcode)
..add('country_id', country_id))
.toString();
}
}
class LocationBuilder implements Builder<Location, LocationBuilder> {
_$Location _$v;
String _locality;
String get locality => _$this._locality;
set locality(String locality) => _$this._locality = locality;
String _address;
String get address => _$this._address;
set address(String address) => _$this._address = address;
String _city;
String get city => _$this._city;
set city(String city) => _$this._city = city;
String _latitude;
String get latitude => _$this._latitude;
set latitude(String latitude) => _$this._latitude = latitude;
String _longitude;
String get longitude => _$this._longitude;
set longitude(String longitude) => _$this._longitude = longitude;
String _zipcode;
String get zipcode => _$this._zipcode;
set zipcode(String zipcode) => _$this._zipcode = zipcode;
num _country_id;
num get country_id => _$this._country_id;
set country_id(num country_id) => _$this._country_id = country_id;
LocationBuilder();
LocationBuilder get _$this {
if (_$v != null) {
_locality = _$v.locality;
_address = _$v.address;
_city = _$v.city;
_latitude = _$v.latitude;
_longitude = _$v.longitude;
_zipcode = _$v.zipcode;
_country_id = _$v.country_id;
_$v = null;
}
return this;
}
@override
void replace(Location other) {
if (other == null) {
throw new ArgumentError.notNull('other');
}
_$v = other as _$Location;
}
@override
void update(void Function(LocationBuilder) updates) {
if (updates != null) updates(this);
}
@override
_$Location build() {
final _$result = _$v ??
new _$Location._(
locality: locality,
address: address,
city: city,
latitude: latitude,
longitude: longitude,
zipcode: zipcode,
country_id: country_id);
replace(_$result);
return _$result;
}
}
// ignore_for_file: always_put_control_body_on_new_line,always_specify_types,annotate_overrides,avoid_annotating_with_dynamic,avoid_as,avoid_catches_without_on_clauses,avoid_returning_this,lines_longer_than_80_chars,omit_local_variable_types,prefer_expression_function_bodies,sort_constructors_first,test_types_in_equals,unnecessary_const,unnecessary_new
| 0 |
mirrored_repositories/Chi_Food/lib | mirrored_repositories/Chi_Food/lib/model/restaurants.g.dart | // GENERATED CODE - DO NOT MODIFY BY HAND
part of 'restaurants.dart';
// **************************************************************************
// BuiltValueGenerator
// **************************************************************************
Serializer<Restaurants> _$restaurantsSerializer = new _$RestaurantsSerializer();
class _$RestaurantsSerializer implements StructuredSerializer<Restaurants> {
@override
final Iterable<Type> types = const [Restaurants, _$Restaurants];
@override
final String wireName = 'Restaurants';
@override
Iterable<Object> serialize(Serializers serializers, Restaurants object,
{FullType specifiedType = FullType.unspecified}) {
final result = <Object>[
'deeplink',
serializers.serialize(object.deeplink,
specifiedType: const FullType(String)),
];
if (object.id != null) {
result
..add('id')
..add(serializers.serialize(object.id,
specifiedType: const FullType(String)));
}
if (object.name != null) {
result
..add('name')
..add(serializers.serialize(object.name,
specifiedType: const FullType(String)));
}
if (object.url != null) {
result
..add('url')
..add(serializers.serialize(object.url,
specifiedType: const FullType(String)));
}
if (object.location != null) {
result
..add('location')
..add(serializers.serialize(object.location,
specifiedType: const FullType(Location)));
}
if (object.average_cost_for_two != null) {
result
..add('average_cost_for_two')
..add(serializers.serialize(object.average_cost_for_two,
specifiedType: const FullType(int)));
}
if (object.cuisines != null) {
result
..add('cuisines')
..add(serializers.serialize(object.cuisines,
specifiedType: const FullType(String)));
}
if (object.price_range != null) {
result
..add('price_range')
..add(serializers.serialize(object.price_range,
specifiedType: const FullType(int)));
}
if (object.currency != null) {
result
..add('currency')
..add(serializers.serialize(object.currency,
specifiedType: const FullType(String)));
}
if (object.thumb != null) {
result
..add('thumb')
..add(serializers.serialize(object.thumb,
specifiedType: const FullType(String)));
}
if (object.featured_image != null) {
result
..add('featured_image')
..add(serializers.serialize(object.featured_image,
specifiedType: const FullType(String)));
}
if (object.photos_url != null) {
result
..add('photos_url')
..add(serializers.serialize(object.photos_url,
specifiedType: const FullType(String)));
}
if (object.menu_url != null) {
result
..add('menu_url')
..add(serializers.serialize(object.menu_url,
specifiedType: const FullType(String)));
}
if (object.events_url != null) {
result
..add('events_url')
..add(serializers.serialize(object.events_url,
specifiedType: const FullType(String)));
}
if (object.user_rating != null) {
result
..add('user_rating')
..add(serializers.serialize(object.user_rating,
specifiedType: const FullType(UserRating)));
}
if (object.has_online_delivery != null) {
result
..add('has_online_delivery')
..add(serializers.serialize(object.has_online_delivery,
specifiedType: const FullType(int)));
}
if (object.is_delivering_now != null) {
result
..add('is_delivering_now')
..add(serializers.serialize(object.is_delivering_now,
specifiedType: const FullType(int)));
}
if (object.has_table_booking != null) {
result
..add('has_table_booking')
..add(serializers.serialize(object.has_table_booking,
specifiedType: const FullType(int)));
}
if (object.timing != null) {
result
..add('timing')
..add(serializers.serialize(object.timing,
specifiedType: const FullType(String)));
}
if (object.all_reviews_count != null) {
result
..add('all_reviews_count')
..add(serializers.serialize(object.all_reviews_count,
specifiedType: const FullType(int)));
}
if (object.photo_count != null) {
result
..add('photo_count')
..add(serializers.serialize(object.photo_count,
specifiedType: const FullType(int)));
}
if (object.phone_numbers != null) {
result
..add('phone_numbers')
..add(serializers.serialize(object.phone_numbers,
specifiedType: const FullType(String)));
}
if (object.photos != null) {
result
..add('photos')
..add(serializers.serialize(object.photos,
specifiedType:
const FullType(BuiltList, const [const FullType(Photo)])));
}
return result;
}
@override
Restaurants deserialize(Serializers serializers, Iterable<Object> serialized,
{FullType specifiedType = FullType.unspecified}) {
final result = new RestaurantsBuilder();
final iterator = serialized.iterator;
while (iterator.moveNext()) {
final key = iterator.current as String;
iterator.moveNext();
final dynamic value = iterator.current;
switch (key) {
case 'id':
result.id = serializers.deserialize(value,
specifiedType: const FullType(String)) as String;
break;
case 'name':
result.name = serializers.deserialize(value,
specifiedType: const FullType(String)) as String;
break;
case 'url':
result.url = serializers.deserialize(value,
specifiedType: const FullType(String)) as String;
break;
case 'location':
result.location.replace(serializers.deserialize(value,
specifiedType: const FullType(Location)) as Location);
break;
case 'average_cost_for_two':
result.average_cost_for_two = serializers.deserialize(value,
specifiedType: const FullType(int)) as int;
break;
case 'cuisines':
result.cuisines = serializers.deserialize(value,
specifiedType: const FullType(String)) as String;
break;
case 'price_range':
result.price_range = serializers.deserialize(value,
specifiedType: const FullType(int)) as int;
break;
case 'currency':
result.currency = serializers.deserialize(value,
specifiedType: const FullType(String)) as String;
break;
case 'thumb':
result.thumb = serializers.deserialize(value,
specifiedType: const FullType(String)) as String;
break;
case 'featured_image':
result.featured_image = serializers.deserialize(value,
specifiedType: const FullType(String)) as String;
break;
case 'photos_url':
result.photos_url = serializers.deserialize(value,
specifiedType: const FullType(String)) as String;
break;
case 'menu_url':
result.menu_url = serializers.deserialize(value,
specifiedType: const FullType(String)) as String;
break;
case 'events_url':
result.events_url = serializers.deserialize(value,
specifiedType: const FullType(String)) as String;
break;
case 'user_rating':
result.user_rating.replace(serializers.deserialize(value,
specifiedType: const FullType(UserRating)) as UserRating);
break;
case 'has_online_delivery':
result.has_online_delivery = serializers.deserialize(value,
specifiedType: const FullType(int)) as int;
break;
case 'is_delivering_now':
result.is_delivering_now = serializers.deserialize(value,
specifiedType: const FullType(int)) as int;
break;
case 'has_table_booking':
result.has_table_booking = serializers.deserialize(value,
specifiedType: const FullType(int)) as int;
break;
case 'deeplink':
result.deeplink = serializers.deserialize(value,
specifiedType: const FullType(String)) as String;
break;
case 'timing':
result.timing = serializers.deserialize(value,
specifiedType: const FullType(String)) as String;
break;
case 'all_reviews_count':
result.all_reviews_count = serializers.deserialize(value,
specifiedType: const FullType(int)) as int;
break;
case 'photo_count':
result.photo_count = serializers.deserialize(value,
specifiedType: const FullType(int)) as int;
break;
case 'phone_numbers':
result.phone_numbers = serializers.deserialize(value,
specifiedType: const FullType(String)) as String;
break;
case 'photos':
result.photos.replace(serializers.deserialize(value,
specifiedType:
const FullType(BuiltList, const [const FullType(Photo)]))
as BuiltList<Object>);
break;
}
}
return result.build();
}
}
class _$Restaurants extends Restaurants {
@override
final String id;
@override
final String name;
@override
final String url;
@override
final Location location;
@override
final int average_cost_for_two;
@override
final String cuisines;
@override
final int price_range;
@override
final String currency;
@override
final String thumb;
@override
final String featured_image;
@override
final String photos_url;
@override
final String menu_url;
@override
final String events_url;
@override
final UserRating user_rating;
@override
final int has_online_delivery;
@override
final int is_delivering_now;
@override
final int has_table_booking;
@override
final String deeplink;
@override
final String timing;
@override
final int all_reviews_count;
@override
final int photo_count;
@override
final String phone_numbers;
@override
final BuiltList<Photo> photos;
factory _$Restaurants([void Function(RestaurantsBuilder) updates]) =>
(new RestaurantsBuilder()..update(updates)).build();
_$Restaurants._(
{this.id,
this.name,
this.url,
this.location,
this.average_cost_for_two,
this.cuisines,
this.price_range,
this.currency,
this.thumb,
this.featured_image,
this.photos_url,
this.menu_url,
this.events_url,
this.user_rating,
this.has_online_delivery,
this.is_delivering_now,
this.has_table_booking,
this.deeplink,
this.timing,
this.all_reviews_count,
this.photo_count,
this.phone_numbers,
this.photos})
: super._() {
if (deeplink == null) {
throw new BuiltValueNullFieldError('Restaurants', 'deeplink');
}
}
@override
Restaurants rebuild(void Function(RestaurantsBuilder) updates) =>
(toBuilder()..update(updates)).build();
@override
RestaurantsBuilder toBuilder() => new RestaurantsBuilder()..replace(this);
@override
bool operator ==(Object other) {
if (identical(other, this)) return true;
return other is Restaurants &&
id == other.id &&
name == other.name &&
url == other.url &&
location == other.location &&
average_cost_for_two == other.average_cost_for_two &&
cuisines == other.cuisines &&
price_range == other.price_range &&
currency == other.currency &&
thumb == other.thumb &&
featured_image == other.featured_image &&
photos_url == other.photos_url &&
menu_url == other.menu_url &&
events_url == other.events_url &&
user_rating == other.user_rating &&
has_online_delivery == other.has_online_delivery &&
is_delivering_now == other.is_delivering_now &&
has_table_booking == other.has_table_booking &&
deeplink == other.deeplink &&
timing == other.timing &&
all_reviews_count == other.all_reviews_count &&
photo_count == other.photo_count &&
phone_numbers == other.phone_numbers &&
photos == other.photos;
}
@override
int get hashCode {
return $jf($jc(
$jc(
$jc(
$jc(
$jc(
$jc(
$jc(
$jc(
$jc(
$jc(
$jc(
$jc(
$jc(
$jc(
$jc(
$jc(
$jc(
$jc(
$jc($jc($jc($jc($jc(0, id.hashCode), name.hashCode), url.hashCode), location.hashCode),
average_cost_for_two.hashCode),
cuisines.hashCode),
price_range.hashCode),
currency.hashCode),
thumb.hashCode),
featured_image.hashCode),
photos_url.hashCode),
menu_url.hashCode),
events_url.hashCode),
user_rating.hashCode),
has_online_delivery.hashCode),
is_delivering_now.hashCode),
has_table_booking.hashCode),
deeplink.hashCode),
timing.hashCode),
all_reviews_count.hashCode),
photo_count.hashCode),
phone_numbers.hashCode),
photos.hashCode));
}
@override
String toString() {
return (newBuiltValueToStringHelper('Restaurants')
..add('id', id)
..add('name', name)
..add('url', url)
..add('location', location)
..add('average_cost_for_two', average_cost_for_two)
..add('cuisines', cuisines)
..add('price_range', price_range)
..add('currency', currency)
..add('thumb', thumb)
..add('featured_image', featured_image)
..add('photos_url', photos_url)
..add('menu_url', menu_url)
..add('events_url', events_url)
..add('user_rating', user_rating)
..add('has_online_delivery', has_online_delivery)
..add('is_delivering_now', is_delivering_now)
..add('has_table_booking', has_table_booking)
..add('deeplink', deeplink)
..add('timing', timing)
..add('all_reviews_count', all_reviews_count)
..add('photo_count', photo_count)
..add('phone_numbers', phone_numbers)
..add('photos', photos))
.toString();
}
}
class RestaurantsBuilder implements Builder<Restaurants, RestaurantsBuilder> {
_$Restaurants _$v;
String _id;
String get id => _$this._id;
set id(String id) => _$this._id = id;
String _name;
String get name => _$this._name;
set name(String name) => _$this._name = name;
String _url;
String get url => _$this._url;
set url(String url) => _$this._url = url;
LocationBuilder _location;
LocationBuilder get location => _$this._location ??= new LocationBuilder();
set location(LocationBuilder location) => _$this._location = location;
int _average_cost_for_two;
int get average_cost_for_two => _$this._average_cost_for_two;
set average_cost_for_two(int average_cost_for_two) =>
_$this._average_cost_for_two = average_cost_for_two;
String _cuisines;
String get cuisines => _$this._cuisines;
set cuisines(String cuisines) => _$this._cuisines = cuisines;
int _price_range;
int get price_range => _$this._price_range;
set price_range(int price_range) => _$this._price_range = price_range;
String _currency;
String get currency => _$this._currency;
set currency(String currency) => _$this._currency = currency;
String _thumb;
String get thumb => _$this._thumb;
set thumb(String thumb) => _$this._thumb = thumb;
String _featured_image;
String get featured_image => _$this._featured_image;
set featured_image(String featured_image) =>
_$this._featured_image = featured_image;
String _photos_url;
String get photos_url => _$this._photos_url;
set photos_url(String photos_url) => _$this._photos_url = photos_url;
String _menu_url;
String get menu_url => _$this._menu_url;
set menu_url(String menu_url) => _$this._menu_url = menu_url;
String _events_url;
String get events_url => _$this._events_url;
set events_url(String events_url) => _$this._events_url = events_url;
UserRatingBuilder _user_rating;
UserRatingBuilder get user_rating =>
_$this._user_rating ??= new UserRatingBuilder();
set user_rating(UserRatingBuilder user_rating) =>
_$this._user_rating = user_rating;
int _has_online_delivery;
int get has_online_delivery => _$this._has_online_delivery;
set has_online_delivery(int has_online_delivery) =>
_$this._has_online_delivery = has_online_delivery;
int _is_delivering_now;
int get is_delivering_now => _$this._is_delivering_now;
set is_delivering_now(int is_delivering_now) =>
_$this._is_delivering_now = is_delivering_now;
int _has_table_booking;
int get has_table_booking => _$this._has_table_booking;
set has_table_booking(int has_table_booking) =>
_$this._has_table_booking = has_table_booking;
String _deeplink;
String get deeplink => _$this._deeplink;
set deeplink(String deeplink) => _$this._deeplink = deeplink;
String _timing;
String get timing => _$this._timing;
set timing(String timing) => _$this._timing = timing;
int _all_reviews_count;
int get all_reviews_count => _$this._all_reviews_count;
set all_reviews_count(int all_reviews_count) =>
_$this._all_reviews_count = all_reviews_count;
int _photo_count;
int get photo_count => _$this._photo_count;
set photo_count(int photo_count) => _$this._photo_count = photo_count;
String _phone_numbers;
String get phone_numbers => _$this._phone_numbers;
set phone_numbers(String phone_numbers) =>
_$this._phone_numbers = phone_numbers;
ListBuilder<Photo> _photos;
ListBuilder<Photo> get photos => _$this._photos ??= new ListBuilder<Photo>();
set photos(ListBuilder<Photo> photos) => _$this._photos = photos;
RestaurantsBuilder();
RestaurantsBuilder get _$this {
if (_$v != null) {
_id = _$v.id;
_name = _$v.name;
_url = _$v.url;
_location = _$v.location?.toBuilder();
_average_cost_for_two = _$v.average_cost_for_two;
_cuisines = _$v.cuisines;
_price_range = _$v.price_range;
_currency = _$v.currency;
_thumb = _$v.thumb;
_featured_image = _$v.featured_image;
_photos_url = _$v.photos_url;
_menu_url = _$v.menu_url;
_events_url = _$v.events_url;
_user_rating = _$v.user_rating?.toBuilder();
_has_online_delivery = _$v.has_online_delivery;
_is_delivering_now = _$v.is_delivering_now;
_has_table_booking = _$v.has_table_booking;
_deeplink = _$v.deeplink;
_timing = _$v.timing;
_all_reviews_count = _$v.all_reviews_count;
_photo_count = _$v.photo_count;
_phone_numbers = _$v.phone_numbers;
_photos = _$v.photos?.toBuilder();
_$v = null;
}
return this;
}
@override
void replace(Restaurants other) {
if (other == null) {
throw new ArgumentError.notNull('other');
}
_$v = other as _$Restaurants;
}
@override
void update(void Function(RestaurantsBuilder) updates) {
if (updates != null) updates(this);
}
@override
_$Restaurants build() {
_$Restaurants _$result;
try {
_$result = _$v ??
new _$Restaurants._(
id: id,
name: name,
url: url,
location: _location?.build(),
average_cost_for_two: average_cost_for_two,
cuisines: cuisines,
price_range: price_range,
currency: currency,
thumb: thumb,
featured_image: featured_image,
photos_url: photos_url,
menu_url: menu_url,
events_url: events_url,
user_rating: _user_rating?.build(),
has_online_delivery: has_online_delivery,
is_delivering_now: is_delivering_now,
has_table_booking: has_table_booking,
deeplink: deeplink,
timing: timing,
all_reviews_count: all_reviews_count,
photo_count: photo_count,
phone_numbers: phone_numbers,
photos: _photos?.build());
} catch (_) {
String _$failedField;
try {
_$failedField = 'location';
_location?.build();
_$failedField = 'user_rating';
_user_rating?.build();
_$failedField = 'photos';
_photos?.build();
} catch (e) {
throw new BuiltValueNestedFieldError(
'Restaurants', _$failedField, e.toString());
}
rethrow;
}
replace(_$result);
return _$result;
}
}
// ignore_for_file: always_put_control_body_on_new_line,always_specify_types,annotate_overrides,avoid_annotating_with_dynamic,avoid_as,avoid_catches_without_on_clauses,avoid_returning_this,lines_longer_than_80_chars,omit_local_variable_types,prefer_expression_function_bodies,sort_constructors_first,test_types_in_equals,unnecessary_const,unnecessary_new
| 0 |
mirrored_repositories/Chi_Food/lib | mirrored_repositories/Chi_Food/lib/model/locationDetail.dart | import 'package:built_collection/built_collection.dart';
import 'package:built_value/built_value.dart';
import 'package:built_value/serializer.dart';
import 'package:chifood/model/locationLocation.dart';
import 'package:chifood/model/popularity.dart';
import 'package:chifood/model/restaurants.dart';
part 'locationDetail.g.dart';
abstract class LocationDetail implements Built<LocationDetail,LocationDetailBuilder>{
static Serializer<LocationDetail> get serializer => _$locationDetailSerializer;
BuiltList<Restaurants> get best_rated_restaurant;
LocationDetail._();
factory LocationDetail([void Function(LocationDetailBuilder) updates]) =_$LocationDetail;
}
| 0 |
mirrored_repositories/Chi_Food/lib | mirrored_repositories/Chi_Food/lib/model/dailyMenu.dart | import 'package:built_collection/built_collection.dart';
import 'package:built_value/built_value.dart';
import 'package:built_value/serializer.dart';
import 'package:chifood/model/dish.dart';
part 'dailyMenu.g.dart';
abstract class DailyMenu implements Built<DailyMenu,DailyMenuBuilder>{
static Serializer<DailyMenu> get serializer => _$dailyMenuSerializer;
String get daily_menu_id;
String get name;
DateTime get start_date;
DateTime get end_date;
BuiltList<Dish> get dishes;
DailyMenu._();
factory DailyMenu([void Function(DailyMenuBuilder) updates]) =_$DailyMenu;
} | 0 |
mirrored_repositories/Chi_Food/lib | mirrored_repositories/Chi_Food/lib/model/searchResult.g.dart | // GENERATED CODE - DO NOT MODIFY BY HAND
part of 'searchResult.dart';
// **************************************************************************
// BuiltValueGenerator
// **************************************************************************
Serializer<SearchResult> _$searchResultSerializer =
new _$SearchResultSerializer();
class _$SearchResultSerializer implements StructuredSerializer<SearchResult> {
@override
final Iterable<Type> types = const [SearchResult, _$SearchResult];
@override
final String wireName = 'SearchResult';
@override
Iterable<Object> serialize(Serializers serializers, SearchResult object,
{FullType specifiedType = FullType.unspecified}) {
final result = <Object>[
'results_found',
serializers.serialize(object.results_found,
specifiedType: const FullType(int)),
'results_start',
serializers.serialize(object.results_start,
specifiedType: const FullType(int)),
'results_shown',
serializers.serialize(object.results_shown,
specifiedType: const FullType(int)),
'restaurants',
serializers.serialize(object.restaurants,
specifiedType:
const FullType(BuiltList, const [const FullType(Restaurants)])),
];
return result;
}
@override
SearchResult deserialize(Serializers serializers, Iterable<Object> serialized,
{FullType specifiedType = FullType.unspecified}) {
final result = new SearchResultBuilder();
final iterator = serialized.iterator;
while (iterator.moveNext()) {
final key = iterator.current as String;
iterator.moveNext();
final dynamic value = iterator.current;
switch (key) {
case 'results_found':
result.results_found = serializers.deserialize(value,
specifiedType: const FullType(int)) as int;
break;
case 'results_start':
result.results_start = serializers.deserialize(value,
specifiedType: const FullType(int)) as int;
break;
case 'results_shown':
result.results_shown = serializers.deserialize(value,
specifiedType: const FullType(int)) as int;
break;
case 'restaurants':
result.restaurants.replace(serializers.deserialize(value,
specifiedType: const FullType(
BuiltList, const [const FullType(Restaurants)]))
as BuiltList<Object>);
break;
}
}
return result.build();
}
}
class _$SearchResult extends SearchResult {
@override
final int results_found;
@override
final int results_start;
@override
final int results_shown;
@override
final BuiltList<Restaurants> restaurants;
factory _$SearchResult([void Function(SearchResultBuilder) updates]) =>
(new SearchResultBuilder()..update(updates)).build();
_$SearchResult._(
{this.results_found,
this.results_start,
this.results_shown,
this.restaurants})
: super._() {
if (results_found == null) {
throw new BuiltValueNullFieldError('SearchResult', 'results_found');
}
if (results_start == null) {
throw new BuiltValueNullFieldError('SearchResult', 'results_start');
}
if (results_shown == null) {
throw new BuiltValueNullFieldError('SearchResult', 'results_shown');
}
if (restaurants == null) {
throw new BuiltValueNullFieldError('SearchResult', 'restaurants');
}
}
@override
SearchResult rebuild(void Function(SearchResultBuilder) updates) =>
(toBuilder()..update(updates)).build();
@override
SearchResultBuilder toBuilder() => new SearchResultBuilder()..replace(this);
@override
bool operator ==(Object other) {
if (identical(other, this)) return true;
return other is SearchResult &&
results_found == other.results_found &&
results_start == other.results_start &&
results_shown == other.results_shown &&
restaurants == other.restaurants;
}
@override
int get hashCode {
return $jf($jc(
$jc($jc($jc(0, results_found.hashCode), results_start.hashCode),
results_shown.hashCode),
restaurants.hashCode));
}
@override
String toString() {
return (newBuiltValueToStringHelper('SearchResult')
..add('results_found', results_found)
..add('results_start', results_start)
..add('results_shown', results_shown)
..add('restaurants', restaurants))
.toString();
}
}
class SearchResultBuilder
implements Builder<SearchResult, SearchResultBuilder> {
_$SearchResult _$v;
int _results_found;
int get results_found => _$this._results_found;
set results_found(int results_found) => _$this._results_found = results_found;
int _results_start;
int get results_start => _$this._results_start;
set results_start(int results_start) => _$this._results_start = results_start;
int _results_shown;
int get results_shown => _$this._results_shown;
set results_shown(int results_shown) => _$this._results_shown = results_shown;
ListBuilder<Restaurants> _restaurants;
ListBuilder<Restaurants> get restaurants =>
_$this._restaurants ??= new ListBuilder<Restaurants>();
set restaurants(ListBuilder<Restaurants> restaurants) =>
_$this._restaurants = restaurants;
SearchResultBuilder();
SearchResultBuilder get _$this {
if (_$v != null) {
_results_found = _$v.results_found;
_results_start = _$v.results_start;
_results_shown = _$v.results_shown;
_restaurants = _$v.restaurants?.toBuilder();
_$v = null;
}
return this;
}
@override
void replace(SearchResult other) {
if (other == null) {
throw new ArgumentError.notNull('other');
}
_$v = other as _$SearchResult;
}
@override
void update(void Function(SearchResultBuilder) updates) {
if (updates != null) updates(this);
}
@override
_$SearchResult build() {
_$SearchResult _$result;
try {
_$result = _$v ??
new _$SearchResult._(
results_found: results_found,
results_start: results_start,
results_shown: results_shown,
restaurants: restaurants.build());
} catch (_) {
String _$failedField;
try {
_$failedField = 'restaurants';
restaurants.build();
} catch (e) {
throw new BuiltValueNestedFieldError(
'SearchResult', _$failedField, e.toString());
}
rethrow;
}
replace(_$result);
return _$result;
}
}
// ignore_for_file: always_put_control_body_on_new_line,always_specify_types,annotate_overrides,avoid_annotating_with_dynamic,avoid_as,avoid_catches_without_on_clauses,avoid_returning_this,lines_longer_than_80_chars,omit_local_variable_types,prefer_expression_function_bodies,sort_constructors_first,test_types_in_equals,unnecessary_const,unnecessary_new
| 0 |
mirrored_repositories/Chi_Food/lib | mirrored_repositories/Chi_Food/lib/model/dailyMenu.g.dart | // GENERATED CODE - DO NOT MODIFY BY HAND
part of 'dailyMenu.dart';
// **************************************************************************
// BuiltValueGenerator
// **************************************************************************
Serializer<DailyMenu> _$dailyMenuSerializer = new _$DailyMenuSerializer();
class _$DailyMenuSerializer implements StructuredSerializer<DailyMenu> {
@override
final Iterable<Type> types = const [DailyMenu, _$DailyMenu];
@override
final String wireName = 'DailyMenu';
@override
Iterable<Object> serialize(Serializers serializers, DailyMenu object,
{FullType specifiedType = FullType.unspecified}) {
final result = <Object>[
'daily_menu_id',
serializers.serialize(object.daily_menu_id,
specifiedType: const FullType(String)),
'name',
serializers.serialize(object.name, specifiedType: const FullType(String)),
'start_date',
serializers.serialize(object.start_date,
specifiedType: const FullType(DateTime)),
'end_date',
serializers.serialize(object.end_date,
specifiedType: const FullType(DateTime)),
'dishes',
serializers.serialize(object.dishes,
specifiedType:
const FullType(BuiltList, const [const FullType(Dish)])),
];
return result;
}
@override
DailyMenu deserialize(Serializers serializers, Iterable<Object> serialized,
{FullType specifiedType = FullType.unspecified}) {
final result = new DailyMenuBuilder();
final iterator = serialized.iterator;
while (iterator.moveNext()) {
final key = iterator.current as String;
iterator.moveNext();
final dynamic value = iterator.current;
switch (key) {
case 'daily_menu_id':
result.daily_menu_id = serializers.deserialize(value,
specifiedType: const FullType(String)) as String;
break;
case 'name':
result.name = serializers.deserialize(value,
specifiedType: const FullType(String)) as String;
break;
case 'start_date':
result.start_date = serializers.deserialize(value,
specifiedType: const FullType(DateTime)) as DateTime;
break;
case 'end_date':
result.end_date = serializers.deserialize(value,
specifiedType: const FullType(DateTime)) as DateTime;
break;
case 'dishes':
result.dishes.replace(serializers.deserialize(value,
specifiedType:
const FullType(BuiltList, const [const FullType(Dish)]))
as BuiltList<Object>);
break;
}
}
return result.build();
}
}
class _$DailyMenu extends DailyMenu {
@override
final String daily_menu_id;
@override
final String name;
@override
final DateTime start_date;
@override
final DateTime end_date;
@override
final BuiltList<Dish> dishes;
factory _$DailyMenu([void Function(DailyMenuBuilder) updates]) =>
(new DailyMenuBuilder()..update(updates)).build();
_$DailyMenu._(
{this.daily_menu_id,
this.name,
this.start_date,
this.end_date,
this.dishes})
: super._() {
if (daily_menu_id == null) {
throw new BuiltValueNullFieldError('DailyMenu', 'daily_menu_id');
}
if (name == null) {
throw new BuiltValueNullFieldError('DailyMenu', 'name');
}
if (start_date == null) {
throw new BuiltValueNullFieldError('DailyMenu', 'start_date');
}
if (end_date == null) {
throw new BuiltValueNullFieldError('DailyMenu', 'end_date');
}
if (dishes == null) {
throw new BuiltValueNullFieldError('DailyMenu', 'dishes');
}
}
@override
DailyMenu rebuild(void Function(DailyMenuBuilder) updates) =>
(toBuilder()..update(updates)).build();
@override
DailyMenuBuilder toBuilder() => new DailyMenuBuilder()..replace(this);
@override
bool operator ==(Object other) {
if (identical(other, this)) return true;
return other is DailyMenu &&
daily_menu_id == other.daily_menu_id &&
name == other.name &&
start_date == other.start_date &&
end_date == other.end_date &&
dishes == other.dishes;
}
@override
int get hashCode {
return $jf($jc(
$jc(
$jc($jc($jc(0, daily_menu_id.hashCode), name.hashCode),
start_date.hashCode),
end_date.hashCode),
dishes.hashCode));
}
@override
String toString() {
return (newBuiltValueToStringHelper('DailyMenu')
..add('daily_menu_id', daily_menu_id)
..add('name', name)
..add('start_date', start_date)
..add('end_date', end_date)
..add('dishes', dishes))
.toString();
}
}
class DailyMenuBuilder implements Builder<DailyMenu, DailyMenuBuilder> {
_$DailyMenu _$v;
String _daily_menu_id;
String get daily_menu_id => _$this._daily_menu_id;
set daily_menu_id(String daily_menu_id) =>
_$this._daily_menu_id = daily_menu_id;
String _name;
String get name => _$this._name;
set name(String name) => _$this._name = name;
DateTime _start_date;
DateTime get start_date => _$this._start_date;
set start_date(DateTime start_date) => _$this._start_date = start_date;
DateTime _end_date;
DateTime get end_date => _$this._end_date;
set end_date(DateTime end_date) => _$this._end_date = end_date;
ListBuilder<Dish> _dishes;
ListBuilder<Dish> get dishes => _$this._dishes ??= new ListBuilder<Dish>();
set dishes(ListBuilder<Dish> dishes) => _$this._dishes = dishes;
DailyMenuBuilder();
DailyMenuBuilder get _$this {
if (_$v != null) {
_daily_menu_id = _$v.daily_menu_id;
_name = _$v.name;
_start_date = _$v.start_date;
_end_date = _$v.end_date;
_dishes = _$v.dishes?.toBuilder();
_$v = null;
}
return this;
}
@override
void replace(DailyMenu other) {
if (other == null) {
throw new ArgumentError.notNull('other');
}
_$v = other as _$DailyMenu;
}
@override
void update(void Function(DailyMenuBuilder) updates) {
if (updates != null) updates(this);
}
@override
_$DailyMenu build() {
_$DailyMenu _$result;
try {
_$result = _$v ??
new _$DailyMenu._(
daily_menu_id: daily_menu_id,
name: name,
start_date: start_date,
end_date: end_date,
dishes: dishes.build());
} catch (_) {
String _$failedField;
try {
_$failedField = 'dishes';
dishes.build();
} catch (e) {
throw new BuiltValueNestedFieldError(
'DailyMenu', _$failedField, e.toString());
}
rethrow;
}
replace(_$result);
return _$result;
}
}
// ignore_for_file: always_put_control_body_on_new_line,always_specify_types,annotate_overrides,avoid_annotating_with_dynamic,avoid_as,avoid_catches_without_on_clauses,avoid_returning_this,lines_longer_than_80_chars,omit_local_variable_types,prefer_expression_function_bodies,sort_constructors_first,test_types_in_equals,unnecessary_const,unnecessary_new
| 0 |
mirrored_repositories/Chi_Food/lib | mirrored_repositories/Chi_Food/lib/model/popularity.dart | import 'package:built_collection/built_collection.dart';
import 'package:built_value/built_value.dart';
import 'package:built_value/serializer.dart';
part 'popularity.g.dart';
abstract class Popularity implements Built<Popularity,PopularityBuilder>{
static Serializer<Popularity> get serializer => _$popularitySerializer;
String get popularity;
String get nightlife_index;
BuiltList<String> get top_cuisines;
Popularity._();
factory Popularity([void Function(PopularityBuilder) updates]) =_$Popularity;
}
| 0 |
mirrored_repositories/Chi_Food/lib | mirrored_repositories/Chi_Food/lib/model/establishment.g.dart | // GENERATED CODE - DO NOT MODIFY BY HAND
part of 'establishment.dart';
// **************************************************************************
// BuiltValueGenerator
// **************************************************************************
Serializer<Establishment> _$establishmentSerializer =
new _$EstablishmentSerializer();
class _$EstablishmentSerializer implements StructuredSerializer<Establishment> {
@override
final Iterable<Type> types = const [Establishment, _$Establishment];
@override
final String wireName = 'Establishment';
@override
Iterable<Object> serialize(Serializers serializers, Establishment object,
{FullType specifiedType = FullType.unspecified}) {
final result = <Object>[
'id',
serializers.serialize(object.id, specifiedType: const FullType(int)),
'name',
serializers.serialize(object.name, specifiedType: const FullType(String)),
];
return result;
}
@override
Establishment deserialize(
Serializers serializers, Iterable<Object> serialized,
{FullType specifiedType = FullType.unspecified}) {
final result = new EstablishmentBuilder();
final iterator = serialized.iterator;
while (iterator.moveNext()) {
final key = iterator.current as String;
iterator.moveNext();
final dynamic value = iterator.current;
switch (key) {
case 'id':
result.id = serializers.deserialize(value,
specifiedType: const FullType(int)) as int;
break;
case 'name':
result.name = serializers.deserialize(value,
specifiedType: const FullType(String)) as String;
break;
}
}
return result.build();
}
}
class _$Establishment extends Establishment {
@override
final int id;
@override
final String name;
factory _$Establishment([void Function(EstablishmentBuilder) updates]) =>
(new EstablishmentBuilder()..update(updates)).build();
_$Establishment._({this.id, this.name}) : super._() {
if (id == null) {
throw new BuiltValueNullFieldError('Establishment', 'id');
}
if (name == null) {
throw new BuiltValueNullFieldError('Establishment', 'name');
}
}
@override
Establishment rebuild(void Function(EstablishmentBuilder) updates) =>
(toBuilder()..update(updates)).build();
@override
EstablishmentBuilder toBuilder() => new EstablishmentBuilder()..replace(this);
@override
bool operator ==(Object other) {
if (identical(other, this)) return true;
return other is Establishment && id == other.id && name == other.name;
}
@override
int get hashCode {
return $jf($jc($jc(0, id.hashCode), name.hashCode));
}
@override
String toString() {
return (newBuiltValueToStringHelper('Establishment')
..add('id', id)
..add('name', name))
.toString();
}
}
class EstablishmentBuilder
implements Builder<Establishment, EstablishmentBuilder> {
_$Establishment _$v;
int _id;
int get id => _$this._id;
set id(int id) => _$this._id = id;
String _name;
String get name => _$this._name;
set name(String name) => _$this._name = name;
EstablishmentBuilder();
EstablishmentBuilder get _$this {
if (_$v != null) {
_id = _$v.id;
_name = _$v.name;
_$v = null;
}
return this;
}
@override
void replace(Establishment other) {
if (other == null) {
throw new ArgumentError.notNull('other');
}
_$v = other as _$Establishment;
}
@override
void update(void Function(EstablishmentBuilder) updates) {
if (updates != null) updates(this);
}
@override
_$Establishment build() {
final _$result = _$v ?? new _$Establishment._(id: id, name: name);
replace(_$result);
return _$result;
}
}
// ignore_for_file: always_put_control_body_on_new_line,always_specify_types,annotate_overrides,avoid_annotating_with_dynamic,avoid_as,avoid_catches_without_on_clauses,avoid_returning_this,lines_longer_than_80_chars,omit_local_variable_types,prefer_expression_function_bodies,sort_constructors_first,test_types_in_equals,unnecessary_const,unnecessary_new
| 0 |
mirrored_repositories/Chi_Food/lib | mirrored_repositories/Chi_Food/lib/model/yelpUser.g.dart | // GENERATED CODE - DO NOT MODIFY BY HAND
part of 'yelpUser.dart';
// **************************************************************************
// BuiltValueGenerator
// **************************************************************************
Serializer<YelpUser> _$yelpUserSerializer = new _$YelpUserSerializer();
class _$YelpUserSerializer implements StructuredSerializer<YelpUser> {
@override
final Iterable<Type> types = const [YelpUser, _$YelpUser];
@override
final String wireName = 'YelpUser';
@override
Iterable<Object> serialize(Serializers serializers, YelpUser object,
{FullType specifiedType = FullType.unspecified}) {
final result = <Object>[
'id',
serializers.serialize(object.id, specifiedType: const FullType(String)),
'profile_url',
serializers.serialize(object.profile_url,
specifiedType: const FullType(String)),
'image_url',
serializers.serialize(object.image_url,
specifiedType: const FullType(String)),
'name',
serializers.serialize(object.name, specifiedType: const FullType(String)),
];
return result;
}
@override
YelpUser deserialize(Serializers serializers, Iterable<Object> serialized,
{FullType specifiedType = FullType.unspecified}) {
final result = new YelpUserBuilder();
final iterator = serialized.iterator;
while (iterator.moveNext()) {
final key = iterator.current as String;
iterator.moveNext();
final dynamic value = iterator.current;
switch (key) {
case 'id':
result.id = serializers.deserialize(value,
specifiedType: const FullType(String)) as String;
break;
case 'profile_url':
result.profile_url = serializers.deserialize(value,
specifiedType: const FullType(String)) as String;
break;
case 'image_url':
result.image_url = serializers.deserialize(value,
specifiedType: const FullType(String)) as String;
break;
case 'name':
result.name = serializers.deserialize(value,
specifiedType: const FullType(String)) as String;
break;
}
}
return result.build();
}
}
class _$YelpUser extends YelpUser {
@override
final String id;
@override
final String profile_url;
@override
final String image_url;
@override
final String name;
factory _$YelpUser([void Function(YelpUserBuilder) updates]) =>
(new YelpUserBuilder()..update(updates)).build();
_$YelpUser._({this.id, this.profile_url, this.image_url, this.name})
: super._() {
if (id == null) {
throw new BuiltValueNullFieldError('YelpUser', 'id');
}
if (profile_url == null) {
throw new BuiltValueNullFieldError('YelpUser', 'profile_url');
}
if (image_url == null) {
throw new BuiltValueNullFieldError('YelpUser', 'image_url');
}
if (name == null) {
throw new BuiltValueNullFieldError('YelpUser', 'name');
}
}
@override
YelpUser rebuild(void Function(YelpUserBuilder) updates) =>
(toBuilder()..update(updates)).build();
@override
YelpUserBuilder toBuilder() => new YelpUserBuilder()..replace(this);
@override
bool operator ==(Object other) {
if (identical(other, this)) return true;
return other is YelpUser &&
id == other.id &&
profile_url == other.profile_url &&
image_url == other.image_url &&
name == other.name;
}
@override
int get hashCode {
return $jf($jc(
$jc($jc($jc(0, id.hashCode), profile_url.hashCode), image_url.hashCode),
name.hashCode));
}
@override
String toString() {
return (newBuiltValueToStringHelper('YelpUser')
..add('id', id)
..add('profile_url', profile_url)
..add('image_url', image_url)
..add('name', name))
.toString();
}
}
class YelpUserBuilder implements Builder<YelpUser, YelpUserBuilder> {
_$YelpUser _$v;
String _id;
String get id => _$this._id;
set id(String id) => _$this._id = id;
String _profile_url;
String get profile_url => _$this._profile_url;
set profile_url(String profile_url) => _$this._profile_url = profile_url;
String _image_url;
String get image_url => _$this._image_url;
set image_url(String image_url) => _$this._image_url = image_url;
String _name;
String get name => _$this._name;
set name(String name) => _$this._name = name;
YelpUserBuilder();
YelpUserBuilder get _$this {
if (_$v != null) {
_id = _$v.id;
_profile_url = _$v.profile_url;
_image_url = _$v.image_url;
_name = _$v.name;
_$v = null;
}
return this;
}
@override
void replace(YelpUser other) {
if (other == null) {
throw new ArgumentError.notNull('other');
}
_$v = other as _$YelpUser;
}
@override
void update(void Function(YelpUserBuilder) updates) {
if (updates != null) updates(this);
}
@override
_$YelpUser build() {
final _$result = _$v ??
new _$YelpUser._(
id: id, profile_url: profile_url, image_url: image_url, name: name);
replace(_$result);
return _$result;
}
}
// ignore_for_file: always_put_control_body_on_new_line,always_specify_types,annotate_overrides,avoid_annotating_with_dynamic,avoid_as,avoid_catches_without_on_clauses,avoid_returning_this,lines_longer_than_80_chars,omit_local_variable_types,prefer_expression_function_bodies,sort_constructors_first,test_types_in_equals,unnecessary_const,unnecessary_new
| 0 |
mirrored_repositories/Chi_Food/lib | mirrored_repositories/Chi_Food/lib/model/geoLocation.g.dart | // GENERATED CODE - DO NOT MODIFY BY HAND
part of 'geoLocation.dart';
// **************************************************************************
// BuiltValueGenerator
// **************************************************************************
Serializer<GeoLocation> _$geoLocationSerializer = new _$GeoLocationSerializer();
class _$GeoLocationSerializer implements StructuredSerializer<GeoLocation> {
@override
final Iterable<Type> types = const [GeoLocation, _$GeoLocation];
@override
final String wireName = 'GeoLocation';
@override
Iterable<Object> serialize(Serializers serializers, GeoLocation object,
{FullType specifiedType = FullType.unspecified}) {
final result = <Object>[
'location',
serializers.serialize(object.location,
specifiedType: const FullType(LocationLocation)),
'popularity',
serializers.serialize(object.popularity,
specifiedType: const FullType(Popularity)),
'nearby_restaurants',
serializers.serialize(object.nearby_restaurants,
specifiedType:
const FullType(BuiltList, const [const FullType(Restaurants)])),
];
return result;
}
@override
GeoLocation deserialize(Serializers serializers, Iterable<Object> serialized,
{FullType specifiedType = FullType.unspecified}) {
final result = new GeoLocationBuilder();
final iterator = serialized.iterator;
while (iterator.moveNext()) {
final key = iterator.current as String;
iterator.moveNext();
final dynamic value = iterator.current;
switch (key) {
case 'location':
result.location.replace(serializers.deserialize(value,
specifiedType: const FullType(LocationLocation))
as LocationLocation);
break;
case 'popularity':
result.popularity.replace(serializers.deserialize(value,
specifiedType: const FullType(Popularity)) as Popularity);
break;
case 'nearby_restaurants':
result.nearby_restaurants.replace(serializers.deserialize(value,
specifiedType: const FullType(
BuiltList, const [const FullType(Restaurants)]))
as BuiltList<Object>);
break;
}
}
return result.build();
}
}
class _$GeoLocation extends GeoLocation {
@override
final LocationLocation location;
@override
final Popularity popularity;
@override
final BuiltList<Restaurants> nearby_restaurants;
factory _$GeoLocation([void Function(GeoLocationBuilder) updates]) =>
(new GeoLocationBuilder()..update(updates)).build();
_$GeoLocation._({this.location, this.popularity, this.nearby_restaurants})
: super._() {
if (location == null) {
throw new BuiltValueNullFieldError('GeoLocation', 'location');
}
if (popularity == null) {
throw new BuiltValueNullFieldError('GeoLocation', 'popularity');
}
if (nearby_restaurants == null) {
throw new BuiltValueNullFieldError('GeoLocation', 'nearby_restaurants');
}
}
@override
GeoLocation rebuild(void Function(GeoLocationBuilder) updates) =>
(toBuilder()..update(updates)).build();
@override
GeoLocationBuilder toBuilder() => new GeoLocationBuilder()..replace(this);
@override
bool operator ==(Object other) {
if (identical(other, this)) return true;
return other is GeoLocation &&
location == other.location &&
popularity == other.popularity &&
nearby_restaurants == other.nearby_restaurants;
}
@override
int get hashCode {
return $jf($jc($jc($jc(0, location.hashCode), popularity.hashCode),
nearby_restaurants.hashCode));
}
@override
String toString() {
return (newBuiltValueToStringHelper('GeoLocation')
..add('location', location)
..add('popularity', popularity)
..add('nearby_restaurants', nearby_restaurants))
.toString();
}
}
class GeoLocationBuilder implements Builder<GeoLocation, GeoLocationBuilder> {
_$GeoLocation _$v;
LocationLocationBuilder _location;
LocationLocationBuilder get location =>
_$this._location ??= new LocationLocationBuilder();
set location(LocationLocationBuilder location) => _$this._location = location;
PopularityBuilder _popularity;
PopularityBuilder get popularity =>
_$this._popularity ??= new PopularityBuilder();
set popularity(PopularityBuilder popularity) =>
_$this._popularity = popularity;
ListBuilder<Restaurants> _nearby_restaurants;
ListBuilder<Restaurants> get nearby_restaurants =>
_$this._nearby_restaurants ??= new ListBuilder<Restaurants>();
set nearby_restaurants(ListBuilder<Restaurants> nearby_restaurants) =>
_$this._nearby_restaurants = nearby_restaurants;
GeoLocationBuilder();
GeoLocationBuilder get _$this {
if (_$v != null) {
_location = _$v.location?.toBuilder();
_popularity = _$v.popularity?.toBuilder();
_nearby_restaurants = _$v.nearby_restaurants?.toBuilder();
_$v = null;
}
return this;
}
@override
void replace(GeoLocation other) {
if (other == null) {
throw new ArgumentError.notNull('other');
}
_$v = other as _$GeoLocation;
}
@override
void update(void Function(GeoLocationBuilder) updates) {
if (updates != null) updates(this);
}
@override
_$GeoLocation build() {
_$GeoLocation _$result;
try {
_$result = _$v ??
new _$GeoLocation._(
location: location.build(),
popularity: popularity.build(),
nearby_restaurants: nearby_restaurants.build());
} catch (_) {
String _$failedField;
try {
_$failedField = 'location';
location.build();
_$failedField = 'popularity';
popularity.build();
_$failedField = 'nearby_restaurants';
nearby_restaurants.build();
} catch (e) {
throw new BuiltValueNestedFieldError(
'GeoLocation', _$failedField, e.toString());
}
rethrow;
}
replace(_$result);
return _$result;
}
}
// ignore_for_file: always_put_control_body_on_new_line,always_specify_types,annotate_overrides,avoid_annotating_with_dynamic,avoid_as,avoid_catches_without_on_clauses,avoid_returning_this,lines_longer_than_80_chars,omit_local_variable_types,prefer_expression_function_bodies,sort_constructors_first,test_types_in_equals,unnecessary_const,unnecessary_new
| 0 |
mirrored_repositories/Chi_Food/lib | mirrored_repositories/Chi_Food/lib/model/yelpCoordinate.dart | import 'package:built_value/built_value.dart';
import 'package:built_value/serializer.dart';
part 'yelpCoordinate.g.dart';
abstract class YelpCoordinate implements Built<YelpCoordinate,YelpCoordinateBuilder>{
static Serializer<YelpCoordinate> get serializer => _$yelpCoordinateSerializer;
double get latitude;
double get longitude;
YelpCoordinate._();
factory YelpCoordinate([void Function(YelpCoordinateBuilder) updates]) =_$YelpCoordinate;
} | 0 |
mirrored_repositories/Chi_Food/lib | mirrored_repositories/Chi_Food/lib/model/reviewUser.dart | import 'package:built_value/built_value.dart';
import 'package:built_value/serializer.dart';
part 'reviewUser.g.dart';
abstract class ReviewUser implements Built<ReviewUser,ReviewUserBuilder> {
static Serializer<ReviewUser> get serializer => _$reviewUserSerializer;
String get name;
String get zomato_handle;
String get foodie_level;
num get foodie_level_num;
String get foodie_color;
String get profile_url;
String get profile_deeplink;
String get profile_image;
factory ReviewUser([void Function(ReviewUserBuilder) updates]) =
_$ReviewUser;
ReviewUser._();
} | 0 |
Subsets and Splits