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
<resources> | |
<style name="SplashTheme" parent="Theme.AppCompat.Light.NoActionBar"> | |
<item name="android:windowFullscreen">true</item> | |
<item name="android:background">@drawable/splash_screen_light</item> | |
</style> | |
<style name="AppTheme" parent="Theme.AppCompat.DayNight.NoActionBar"> | |
<!-- Customize your theme here. --> | |
<item name="android:textColor">#000000</item> | |
<item name="colorAccent">#1e9f21</item> |
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 | |
protected void onCreate(Bundle savedInstanceState) { | |
switch (getResources().getConfiguration().uiMode & Configuration.UI_MODE_NIGHT_MASK) { | |
case Configuration.UI_MODE_NIGHT_YES: | |
setTheme(R.style.DarkTheme); | |
break; | |
case Configuration.UI_MODE_NIGHT_NO: | |
setTheme(R.style.LightTheme); | |
break; |
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
<?xml version="1.0" encoding="utf-8"?> | |
<layer-list xmlns:android="http://schemas.android.com/apk/res/android"> | |
<item | |
android:id="@+id/splash_background" | |
android:drawable="@android:color/darker_gray" | |
android:gravity="fill" > | |
</item> |
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
<resources> | |
<style name="SplashTheme" parent="Theme.AppCompat.Light.NoActionBar"> | |
<item name="android:windowFullscreen">true</item> | |
<item name="android:background">@drawable/splash_screen_dark</item> | |
</style> | |
<style name="AppTheme" parent="Theme.AppCompat.DayNight.NoActionBar"> | |
<item name="android:textColor">#000000</item> | |
<item name="colorAccent">#1e9f21</item> | |
</style> |
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
<resources> | |
<style name="SplashTheme" parent="Theme.AppCompat.Light.NoActionBar"> | |
<item name="android:windowFullscreen">true</item> | |
<item name="android:background">@drawable/splash_screen_light</item> | |
</style> | |
<style name="AppTheme" parent="Theme.AppCompat.DayNight.NoActionBar"> | |
<!-- Customize your theme here. --> | |
<item name="android:textColor">#000000</item> | |
<item name="colorAccent">#1e9f21</item> |
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
<manifest xmlns:android="http://schemas.android.com/apk/res/android" | |
package="com.basicsetup"> | |
<uses-permission android:name="android.permission.INTERNET" /> | |
<application | |
android:name=".MainApplication" | |
android:allowBackup="false" | |
android:icon="@mipmap/ic_launcher" | |
android:label="@string/app_name" |
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
public class SplashScreenActivity extends AppCompatActivity { | |
@Override | |
protected void onCreate(Bundle savedInstanceState) { | |
super.onCreate(savedInstanceState); | |
Intent intent = new Intent(this, MainActivity.class); | |
startActivity(intent); | |
finish(); | |
} |
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:flutter/material.dart'; | |
import 'package:camera/camera.dart'; | |
import 'package:path_provider/path_provider.dart'; | |
List<CameraDescription> cameras; | |
IconData getCameraLensIcon(CameraLensDirection direction) { | |
switch (direction) { |
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
Widget beerInfoInputsWidget() { | |
return Column( | |
children: [ | |
Padding( | |
padding: const EdgeInsets.only(left: 3, bottom: 4.0), | |
child: TextField( | |
controller: nameController, | |
onChanged: (v) => nameController.text = v, | |
decoration: InputDecoration( | |
labelText: 'Name the beer', |
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 onNewCameraSelected(CameraDescription cameraDescription) async { | |
if (controller != null) { | |
await controller.dispose(); | |
} | |
controller = CameraController(cameraDescription, ResolutionPreset.high); | |
controller.addListener(() { | |
if (mounted) setState(() {}); | |
if (controller.value.hasError) { | |
showInSnackBar('Camera error ${controller.value.errorDescription}'); |
NewerOlder