This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
async findAll( | |
i18n: I18nContext, | |
dto: FilterChildDto, | |
user: User, | |
): Promise<Pagination<Child>> { | |
const { relation, take, skip, search, sharedCarerId } = dto; | |
const query = this.childRepo.createQueryBuilder('child'); | |
switch (relation) { | |
case UserType.PARENT: | |
if (sharedCarerId) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* Here All App Routes | |
* */ | |
import 'package:flutter/animation.dart'; | |
import 'package:flutter/cupertino.dart'; | |
import 'package:flutter/foundation.dart'; | |
import 'package:get/get.dart'; | |
import 'package:luna_events_app/presentation/pages/auth_pages/activate_page.dart'; | |
import 'package:luna_events_app/presentation/pages/auth_pages/change_password_page.dart'; | |
import 'package:luna_events_app/presentation/pages/change_profile_page/change_profile_page.dart'; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Container( | |
decoration: BoxDecoration( | |
gradient: LinearGradient(begin: Alignment.topCenter, end: Alignment.bottomCenter, colors: [ | |
Get.theme.backgroundColor, | |
Get.theme.backgroundColor.withOpacity(0.8), | |
Get.theme.backgroundColor.withOpacity(0.2), | |
]), | |
), | |
), |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@override | |
Future<bool> cache(Event event) async { | |
// TODO: implement cache | |
final jsonString = event.toJson(); | |
return sharedPreferences.setString( | |
EVENT + event.id.toString(), | |
json.encode(jsonString), | |
); | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@override | |
Future<bool> cacheAll(List<Event> events) async { | |
// TODO: implement cacheAll | |
var jsonData= events.map((v) => v.toJson()).toList(); | |
return sharedPreferences.setString( | |
LIST_EVENTS, | |
json.encode(jsonData), | |
); | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class MockSharedPreferences extends Mock implements SharedPreferences {} | |
main() { | |
// Here some classes declaration | |
setUp(() {}); | |
group('description', () { | |
// Here some attribute to work with in the tests | |
test('description', () { | |
// ARRANGE |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.ecomflutter.demo.config; | |
import org.springframework.context.annotation.Bean; | |
import org.springframework.context.annotation.Configuration; | |
import springfox.documentation.builders.RequestHandlerSelectors; | |
import springfox.documentation.spi.DocumentationType; | |
import springfox.documentation.spring.web.plugins.Docket; | |
@Configuration | |
public class SwaggerConfig { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import 'dart:async'; | |
import 'dart:convert'; | |
import 'dart:io'; | |
import 'package:http/http.dart' as http; | |
Future<Album> fetchAlbum() async { | |
final response = await http.get( | |
'https://jsonplaceholder.typicode.com/albums/1', | |
headers: {HttpHeaders.authorizationHeader: "Bearer your_api_token_here"}, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
typedef Future<NumberTrivia> _ConcreteOrRandomChooser(); | |
class NumberTriviaRepositoryImpl implements NumberTriviaRepository { | |
final NumberTriviaRemoteDataSource remoteDataSource; | |
final NumberTriviaLocalDataSource localDataSource; | |
final NetworkInfo networkInfo; | |
NumberTriviaRepositoryImpl({ | |
@required this.remoteDataSource, | |
@required this.localDataSource, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
flutter pub run build_runner watch --delete-conflicting-outputs |