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
enum EpisodeReadingStatus { | |
notStarted, | |
inProgress, | |
completed; | |
factory EpisodeReadingStatus.fromProgress(double progress) { | |
if (progress == 0) return EpisodeReadingStatus.notStarted; | |
else if (progress < 1) return EpisodeReadingStatus.inProgress; | |
else return EpisodeReadingStatus.completed; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import 'package:flutter/gestures.dart'; | |
import 'package:flutter/widgets.dart'; | |
// Custom Gesture Recognizer. | |
// rejectGesture() is overridden. When a gesture is rejected, this is the function that is called. By default, it disposes of the | |
// Recognizer and runs clean up. However we modified it so that instead the Recognizer is disposed of, it is actually manually added. | |
// The result is instead you have one Recognizer winning the Arena, you have two. It is a win-win. | |
class AllowMultipleTapGesturesRecognizer extends TapGestureRecognizer { | |
@override | |
void rejectGesture(int pointer) { |
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 { shallowWithStore } from 'enzyme-redux'; | |
import React, { PureComponent, ReactNode } from 'react'; | |
import { MockedProvider } from 'react-apollo/test-utils'; | |
import { View } from 'react-native'; | |
import renderer from 'react-test-renderer'; | |
import { createMockStore } from 'redux-test-utils'; | |
import wait from 'waait'; | |
import getPaymentStatus from '../../../queries/getPaymentStatus.gql'; | |