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:io'; | |
| import 'package:camera/camera.dart'; | |
| import 'package:get/get.dart'; | |
| class CapturePersonalPictureController extends GetxController { | |
| CapturePersonalPictureController({required this.returnDataFunction}); | |
| late CameraController cameraController; |
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
| static ThemeData darkTheme() { | |
| return FlexThemeData.dark( | |
| scheme: FlexScheme.blueWhale, | |
| colorScheme: const ColorScheme( | |
| brightness: Brightness.dark, | |
| primary: Color(0xff57859d), | |
| onPrimary: Color(0xfff5f9fb), | |
| primaryContainer: Color(0xff2a9d8f), | |
| onPrimaryContainer: Color(0xffe6f8f6), | |
| secondary: Color(0xffed7f29), |
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/material.dart'; | |
| import 'package:get/get.dart'; | |
| class ThemeUtil { | |
| static ThemeData themeData(bool isDarkTheme, BuildContext context) { | |
| return ThemeData( | |
| pageTransitionsTheme: const PageTransitionsTheme(builders: { | |
| TargetPlatform.android: FadeUpwardsPageTransitionsBuilder(), | |
| TargetPlatform.iOS: FadeUpwardsPageTransitionsBuilder(), | |
| }), |
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
| # If you come from bash you might have to change your $PATH. | |
| # export PATH=$HOME/bin:/usr/local/bin:$PATH | |
| # Path to your oh-my-zsh installation. | |
| export ZSH="/Users/ahmad/.oh-my-zsh" | |
| # Set name of the theme to load --- if set to "random", it will | |
| # load a random theme each time oh-my-zsh is loaded, in which case, | |
| # to know which specific one was loaded, run: echo $RANDOM_THEME | |
| # See https://github.com/robbyrussell/oh-my-zsh/wiki/Themes |
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 _MyHomePageState extends State<MyHomePage> { | |
| @override | |
| Widget build(BuildContext context) { | |
| return Scaffold( | |
| appBar: AppBar( | |
| title: Text(widget.title), | |
| ), | |
| body: Center( | |
| child: Column( | |
| mainAxisAlignment: MainAxisAlignment.center, |
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 | |
| public void applyOverrideConfiguration(@Nullable Configuration overrideConfiguration) { | |
| if (overrideConfiguration != null) { | |
| int uiMode = overrideConfiguration.uiMode; | |
| overrideConfiguration.setTo(getBaseContext().getResources().getConfiguration()); | |
| overrideConfiguration.uiMode = uiMode; | |
| } | |
| super.applyOverrideConfiguration(getResources().getConfiguration()); | |
| } |
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.github.bkhezry.buildingcollection.service; | |
| import android.app.IntentService; | |
| import android.app.Notification; | |
| import android.app.NotificationChannel; | |
| import android.app.NotificationManager; | |
| import android.app.Service; | |
| import android.content.Intent; | |
| import android.location.Location; | |
| import android.os.Build; |
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
| iconv -f CP1256 -t UTF-8 input.srt -o output.srt |
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
| //Request google sign in | |
| Intent signInIntent = Auth.GoogleSignInApi.getSignInIntent(mGoogleApiClient); | |
| startActivityForResult(signInIntent, RC_SIGN_IN); | |
| //Get selected account data | |
| @Override | |
| public void onActivityResult(int requestCode, int resultCode, Intent data) { | |
| super.onActivityResult(requestCode, resultCode, data); | |
| if (requestCode == RC_SIGN_IN) { | |
| GoogleSignInResult result = Auth.GoogleSignInApi.getSignInResultFromIntent(data); |
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
| private void setUpGoogleSignIn() { | |
| GoogleSignInOptions gso = new GoogleSignInOptions.Builder(GoogleSignInOptions.DEFAULT_SIGN_IN) | |
| .requestIdToken(getString(R.string.default_web_client_id)) | |
| .requestEmail() | |
| .build(); | |
| mGoogleApiClient = new GoogleApiClient.Builder(this) | |
| .enableAutoManage(this /* FragmentActivity */, this /* OnConnectionFailedListener */) | |
| .addApi(Auth.GOOGLE_SIGN_IN_API, gso) | |
| .build(); | |
| } |
NewerOlder