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 LoginScreen extends StatefulWidget { | |
| @override | |
| State<StatefulWidget> createState() => _LoginScreenState(); | |
| } | |
| class _LoginScreenState extends State<LoginScreen> { | |
| final _auth = FirebaseAuth.instance; | |
| final _googleSignIn = GoogleSignIn(); | |
| String _errorMessage; | |
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 CurrentUser { | |
| final bool isInitialValue; | |
| final FirebaseUser data; | |
| const CurrentUser._(this.data, this.isInitialValue); | |
| factory CurrentUser.create(FirebaseUser data) => CurrentUser._(data, false); | |
| /// The inital empty instance. | |
| static const initial = CurrentUser._(null, true); | |
| } |
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
| void main() => runApp(NotesApp()); | |
| /// Root widget of the application. | |
| class NotesApp extends StatelessWidget { | |
| @override | |
| Widget build(BuildContext context) => StreamProvider.value( | |
| initialData: CurrentUser.initial, | |
| value: FirebaseAuth.instance.onAuthStateChanged.map((user) => CurrentUser.create(user)), | |
| child: Consumer<CurrentUser>( | |
| builder: (context, user, _) => MaterialApp( |
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
| - name: notification | |
| # uses: ./ # use relative path if this's the same repo of your action | |
| uses: <user>/<repo>@v1 | |
| with: | |
| botToken: <TelegramBotToken> | |
| chatId: <TelegramChatId> | |
| jobStatus: ${{ job.status }} |
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
| { | |
| "scripts": { | |
| "build": "tsc", | |
| "clean": "rm -rf lib package-lock.json", | |
| "rebuild": "yarn clean && yarn build", | |
| "release": "yarn clean && yarn && yarn build && yarn npm-lock && mv -f package-lock.json npm.lock && rm -rf node_modules && yarn --prod && mv npm.lock package-lock.json", | |
| "dev": "yarn clean && yarn", | |
| "npm-lock": "synp -f -s yarn.lock" | |
| } | |
| } |
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
| name: 'Telegram Action' | |
| description: 'Telegram notification for workflow set up with GitHub Actions' | |
| author: <name> | |
| inputs: | |
| botToken: | |
| description: 'The Telegram Bot token' | |
| required: true | |
| chatId: | |
| description: 'The target to which the message will be sent, can be a Telegram Channel or Group' | |
| required: true |
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 * as core from '@actions/core'; | |
| import { context } from '@actions/github'; | |
| import * as request from 'request-promise-native'; | |
| (async function run() { | |
| try { | |
| const botToken = core.getInput('botToken'); | |
| const chatId = core.getInput('chatId'); | |
| const jobStatus = core.getInput('jobStatus'); | |
| const skipSuccess = (core.getInput('skipSuccess') || 'true') === 'true'; |
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
| Branch/Tag | Desc | Development | Distribution | |
|---|---|---|---|---|
| master | where we commit changes | ✅ | ||
| releases/v{version} | release candidates e.g. releases/v1.0 | ✅ | ||
| v{version} | tags referred from workflows e.g. v1.0 | ✅ |
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
| ... | |
| apply from: './flavors.gradle' | |
| ... | |
| android { | |
| buildTypes { | |
| productFlavors { | |
| project.flavors.each { flavor, config -> | |
| "$flavor" { | |
| dimension 'scope' | |
| if (flavor != 'full') { |
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
| val ExtraPropertiesExtension.deps: DependencyGroup | |
| get() = | |
| if (has("deps")) this["deps"] as DependencyGroup | |
| else DependencyGroup().apply { | |
| this@deps["deps"] = this | |
| } |