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 | Type | Default | Description | |
|---|---|---|---|---|
| DATA_URL | number | 0 | Return base64 encoded string. DATA_URL can be very memory intensive and cause app crashes or out of memory errors. Use FILE_URI or NATIVE_URI if possible | |
| FILE_URI | number | 1 | Return file uri (content://media/external/images/media/2 for Android) | |
| NATIVE_URI | number | 2 | Return native uri (eg. asset-library://... for iOS) |
We can make this file beautiful and searchable if this error is corrected: It looks like row 2 should actually have 3 columns, instead of 4 in line 1.
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,Type,Default Description | |
| JPEG,number,0,Return JPEG encoded image | |
| PNG,number,1,Return PNG encoded image |
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 | Type | Default | Description | |
|---|---|---|---|---|
| JPEG | number | 0 | Return JPEG encoded image | |
| PNG | number | 1 | Return PNG encoded image |
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 | Type | Default | Description | |
|---|---|---|---|---|
| PICTURE | number | 0 | Allow selection of still pictures only. DEFAULT. Will return format specified via DestinationType | |
| VIDEO | number | 1 | Allow selection of video only RETURNS URL | |
| ALLMEDIA | number | 2 | Allow selection from all media types |
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,Type,Default,Description | |
| PHOTOLIBRARY,number,0,Choose image from the device's photo library (same as SAVEDPHOTOALBUM for Android) | |
| CAMERA,number,1,Take picture from camera | |
| SAVEDPHOTOALBUM,number,2,Choose image only from the device's Camera Roll album (same as PHOTOLIBRARY for Android) |
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 | Type | Default | Description | |
|---|---|---|---|---|
| PHOTOLIBRARY | number | 0 | Choose image from the device's photo library (same as SAVEDPHOTOALBUM for Android) | |
| CAMERA | number | 1 | Take picture from camera | |
| SAVEDPHOTOALBUM | number | 2 | Choose image only from the device's Camera Roll album (same as PHOTOLIBRARY for Android) |
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 { IonContent, IonHeader, IonPage, IonTitle, IonToolbar } from '@ionic/react'; | |
| import React from 'react'; | |
| import ExploreContainer from '../components/ExploreContainer'; | |
| import './Home.css'; | |
| const Home: React.FC = () => { | |
| return ( | |
| <IonPage> | |
| <IonHeader> | |
| <IonToolbar> |
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
| <ion-list> | |
| <ion-item lines="full"> | |
| <ion-icon slot="start" name="moon"></ion-icon> | |
| <ion-label> | |
| Toggle Dark Theme | |
| </ion-label> | |
| <ion-toggle (ionChange)="onChange($event)" [(ngModel)]="checked" id="themeToggle" slot="end"></ion-toggle> | |
| </ion-item> | |
| </ion-list> |
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
| <ion-list> | |
| <ion-item lines="full"> | |
| <ion-icon slot="start" name="moon"></ion-icon> | |
| <ion-label> | |
| Toggle Dark Theme | |
| </ion-label> | |
| <ion-toggle (ionChange)="onChange($event)" id="themeToggle" slot="end"></ion-toggle> | |
| </ion-item> | |
| </ion-list> |
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
| onChange(event) { | |
| let darkMode = window.matchMedia("(prefers-color-scheme: dark)"); | |
| darkMode.addListener(this.colorTest); | |
| if(event.detail.checked){ | |
| document.body.setAttribute('data-theme', 'dark'); | |
| } | |
| else{ | |
| document.body.setAttribute('data-theme', 'light'); | |
| } | |
| } |