Commit 51961895 authored by Inomjon's avatar Inomjon

Aplication webga chiqdi

parent a8d8ca46
06edd3d07f0b028e0af881e89663c234
\ No newline at end of file
assets/contact_avatar.png  assetassets/contact_avatar.pngassets/loading.json  assetassets/loading.jsonassets/mymeetinglogo.png  assetassets/mymeetinglogo.png2packages/cupertino_icons/assets/CupertinoIcons.ttf  asset2packages/cupertino_icons/assets/CupertinoIcons.ttf
\ No newline at end of file
{"assets/contact_avatar.png":["assets/contact_avatar.png"],"assets/loading.json":["assets/loading.json"],"assets/mymeetinglogo.png":["assets/mymeetinglogo.png"],"packages/cupertino_icons/assets/CupertinoIcons.ttf":["packages/cupertino_icons/assets/CupertinoIcons.ttf"]}
\ No newline at end of file
[{"family":"MaterialIcons","fonts":[{"asset":"fonts/MaterialIcons-Regular.otf"}]},{"family":"packages/cupertino_icons/CupertinoIcons","fonts":[{"asset":"packages/cupertino_icons/assets/CupertinoIcons.ttf"}]}]
\ No newline at end of file
This diff is collapsed.
This diff is collapsed.
{
"sksl": "// This SkSL shader is autogenerated by spirv-cross.\n\nfloat4 flutter_FragCoord;\n\nuniform vec4 u_color;\nuniform float u_alpha;\nuniform vec4 u_sparkle_color;\nuniform float u_sparkle_alpha;\nuniform float u_blur;\nuniform vec2 u_center;\nuniform float u_radius_scale;\nuniform float u_max_radius;\nuniform vec2 u_resolution_scale;\nuniform vec2 u_noise_scale;\nuniform float u_noise_phase;\nuniform vec2 u_circle1;\nuniform vec2 u_circle2;\nuniform vec2 u_circle3;\nuniform vec2 u_rotation1;\nuniform vec2 u_rotation2;\nuniform vec2 u_rotation3;\n\nvec4 fragColor;\n\nvec2 FLT_flutter_local_FlutterFragCoord()\n{\n return flutter_FragCoord.xy;\n}\n\nmat2 FLT_flutter_local_rotate2d(vec2 rad)\n{\n return mat2(vec2(rad.x, -rad.y), vec2(rad.y, rad.x));\n}\n\nfloat FLT_flutter_local_soft_circle(vec2 uv, vec2 xy, float radius, float blur)\n{\n float blur_half = blur * 0.5;\n float d = distance(uv, xy);\n return 1.0 - smoothstep(1.0 - blur_half, 1.0 + blur_half, d / radius);\n}\n\nfloat FLT_flutter_local_circle_grid(vec2 resolution, inout vec2 p, vec2 xy, vec2 rotation, float cell_diameter)\n{\n vec2 param = rotation;\n p = (FLT_flutter_local_rotate2d(param) * (xy - p)) + xy;\n p = mod(p, vec2(cell_diameter)) / resolution;\n float cell_uv = (cell_diameter / resolution.y) * 0.5;\n float r = 0.64999997615814208984375 * cell_uv;\n vec2 param_1 = p;\n vec2 param_2 = vec2(cell_uv);\n float param_3 = r;\n float param_4 = r * 50.0;\n return FLT_flutter_local_soft_circle(param_1, param_2, param_3, param_4);\n}\n\nfloat FLT_flutter_local_turbulence(vec2 uv)\n{\n vec2 uv_scale = uv * vec2(0.800000011920928955078125);\n vec2 param = vec2(0.800000011920928955078125);\n vec2 param_1 = uv_scale;\n vec2 param_2 = u_circle1;\n vec2 param_3 = u_rotation1;\n float param_4 = 0.17000000178813934326171875;\n float _301 = FLT_flutter_local_circle_grid(param, param_1, param_2, param_3, param_4);\n float g1 = _301;\n vec2 param_5 = vec2(0.800000011920928955078125);\n vec2 param_6 = uv_scale;\n vec2 param_7 = u_circle2;\n vec2 param_8 = u_rotation2;\n float param_9 = 0.20000000298023223876953125;\n float _313 = FLT_flutter_local_circle_grid(param_5, param_6, param_7, param_8, param_9);\n float g2 = _313;\n vec2 param_10 = vec2(0.800000011920928955078125);\n vec2 param_11 = uv_scale;\n vec2 param_12 = u_circle3;\n vec2 param_13 = u_rotation3;\n float param_14 = 0.2750000059604644775390625;\n float _326 = FLT_flutter_local_circle_grid(param_10, param_11, param_12, param_13, param_14);\n float g3 = _326;\n float v = (((g1 * g1) + g2) - g3) * 0.5;\n return clamp(0.449999988079071044921875 + (0.800000011920928955078125 * v), 0.0, 1.0);\n}\n\nfloat FLT_flutter_local_soft_ring(vec2 uv, vec2 xy, float radius, float thickness, float blur)\n{\n vec2 param = uv;\n vec2 param_1 = xy;\n float param_2 = radius + thickness;\n float param_3 = blur;\n float circle_outer = FLT_flutter_local_soft_circle(param, param_1, param_2, param_3);\n vec2 param_4 = uv;\n vec2 param_5 = xy;\n float param_6 = max(radius - thickness, 0.0);\n float param_7 = blur;\n float circle_inner = FLT_flutter_local_soft_circle(param_4, param_5, param_6, param_7);\n return clamp(circle_outer - circle_inner, 0.0, 1.0);\n}\n\nfloat FLT_flutter_local_triangle_noise(inout vec2 n)\n{\n n = fract(n * vec2(5.398700237274169921875, 5.442100048065185546875));\n n += vec2(dot(n.yx, n + vec2(21.5351009368896484375, 14.3136997222900390625)));\n float xy = n.x * n.y;\n return (fract(xy * 95.43070220947265625) + fract(xy * 75.0496063232421875)) - 1.0;\n}\n\nfloat FLT_flutter_local_threshold(float v, float l, float h)\n{\n return step(l, v) * (1.0 - step(h, v));\n}\n\nfloat FLT_flutter_local_sparkle(vec2 uv, float t)\n{\n vec2 param = uv;\n float _224 = FLT_flutter_local_triangle_noise(param);\n float n = _224;\n float param_1 = n;\n float param_2 = 0.0;\n float param_3 = 0.0500000007450580596923828125;\n float s = FLT_flutter_local_threshold(param_1, param_2, param_3);\n float param_4 = n + sin(3.1415927410125732421875 * (t + 0.3499999940395355224609375));\n float param_5 = 0.100000001490116119384765625;\n float param_6 = 0.1500000059604644775390625;\n s += FLT_flutter_local_threshold(param_4, param_5, param_6);\n float param_7 = n + sin(3.1415927410125732421875 * (t + 0.699999988079071044921875));\n float param_8 = 0.20000000298023223876953125;\n float param_9 = 0.25;\n s += FLT_flutter_local_threshold(param_7, param_8, param_9);\n float param_10 = n + sin(3.1415927410125732421875 * (t + 1.0499999523162841796875));\n float param_11 = 0.300000011920928955078125;\n float param_12 = 0.3499999940395355224609375;\n s += FLT_flutter_local_threshold(param_10, param_11, param_12);\n return clamp(s, 0.0, 1.0) * 0.550000011920928955078125;\n}\n\nvoid FLT_main()\n{\n vec2 p = FLT_flutter_local_FlutterFragCoord();\n vec2 uv_1 = p * u_resolution_scale;\n vec2 density_uv = uv_1 - mod(p, u_noise_scale);\n float radius = u_max_radius * u_radius_scale;\n vec2 param_13 = uv_1;\n float turbulence = FLT_flutter_local_turbulence(param_13);\n vec2 param_14 = p;\n vec2 param_15 = u_center;\n float param_16 = radius;\n float param_17 = 0.0500000007450580596923828125 * u_max_radius;\n float param_18 = u_blur;\n float ring = FLT_flutter_local_soft_ring(param_14, param_15, param_16, param_17, param_18);\n vec2 param_19 = density_uv;\n float param_20 = u_noise_phase;\n float sparkle = ((FLT_flutter_local_sparkle(param_19, param_20) * ring) * turbulence) * u_sparkle_alpha;\n vec2 param_21 = p;\n vec2 param_22 = u_center;\n float param_23 = radius;\n float param_24 = u_blur;\n float wave_alpha = (FLT_flutter_local_soft_circle(param_21, param_22, param_23, param_24) * u_alpha) * u_color.w;\n vec4 wave_color = vec4(u_color.xyz * wave_alpha, wave_alpha);\n vec4 sparkle_color = vec4(u_sparkle_color.xyz * u_sparkle_color.w, u_sparkle_color.w);\n fragColor = mix(wave_color, sparkle_color, vec4(sparkle));\n}\n\nhalf4 main(float2 iFragCoord)\n{\n flutter_FragCoord = float4(iFragCoord, 0, 0);\n FLT_main();\n return fragColor;\n}\n",
"stage": 1,
"target_platform": 2,
"uniforms": [
{
"array_elements": 0,
"bit_width": 32,
"columns": 1,
"location": 0,
"name": "u_color",
"rows": 4,
"type": 10
},
{
"array_elements": 0,
"bit_width": 32,
"columns": 1,
"location": 1,
"name": "u_alpha",
"rows": 1,
"type": 10
},
{
"array_elements": 0,
"bit_width": 32,
"columns": 1,
"location": 2,
"name": "u_sparkle_color",
"rows": 4,
"type": 10
},
{
"array_elements": 0,
"bit_width": 32,
"columns": 1,
"location": 3,
"name": "u_sparkle_alpha",
"rows": 1,
"type": 10
},
{
"array_elements": 0,
"bit_width": 32,
"columns": 1,
"location": 4,
"name": "u_blur",
"rows": 1,
"type": 10
},
{
"array_elements": 0,
"bit_width": 32,
"columns": 1,
"location": 5,
"name": "u_center",
"rows": 2,
"type": 10
},
{
"array_elements": 0,
"bit_width": 32,
"columns": 1,
"location": 6,
"name": "u_radius_scale",
"rows": 1,
"type": 10
},
{
"array_elements": 0,
"bit_width": 32,
"columns": 1,
"location": 7,
"name": "u_max_radius",
"rows": 1,
"type": 10
},
{
"array_elements": 0,
"bit_width": 32,
"columns": 1,
"location": 8,
"name": "u_resolution_scale",
"rows": 2,
"type": 10
},
{
"array_elements": 0,
"bit_width": 32,
"columns": 1,
"location": 9,
"name": "u_noise_scale",
"rows": 2,
"type": 10
},
{
"array_elements": 0,
"bit_width": 32,
"columns": 1,
"location": 10,
"name": "u_noise_phase",
"rows": 1,
"type": 10
},
{
"array_elements": 0,
"bit_width": 32,
"columns": 1,
"location": 11,
"name": "u_circle1",
"rows": 2,
"type": 10
},
{
"array_elements": 0,
"bit_width": 32,
"columns": 1,
"location": 12,
"name": "u_circle2",
"rows": 2,
"type": 10
},
{
"array_elements": 0,
"bit_width": 32,
"columns": 1,
"location": 13,
"name": "u_circle3",
"rows": 2,
"type": 10
},
{
"array_elements": 0,
"bit_width": 32,
"columns": 1,
"location": 14,
"name": "u_rotation1",
"rows": 2,
"type": 10
},
{
"array_elements": 0,
"bit_width": 32,
"columns": 1,
"location": 15,
"name": "u_rotation2",
"rows": 2,
"type": 10
},
{
"array_elements": 0,
"bit_width": 32,
"columns": 1,
"location": 16,
"name": "u_rotation3",
"rows": 2,
"type": 10
}
]
}
\ No newline at end of file
This diff is collapsed.
This diff is collapsed.
This source diff could not be displayed because it is too large. You can view the blob instead.
"use strict";var Module={};var ENVIRONMENT_IS_NODE=typeof process=="object"&&typeof process.versions=="object"&&typeof process.versions.node=="string";if(ENVIRONMENT_IS_NODE){var nodeWorkerThreads=require("worker_threads");var parentPort=nodeWorkerThreads.parentPort;parentPort.on("message",data=>onmessage({data:data}));var fs=require("fs");Object.assign(global,{self:global,require:require,Module:Module,location:{href:__filename},Worker:nodeWorkerThreads.Worker,importScripts:function(f){(0,eval)(fs.readFileSync(f,"utf8")+"//# sourceURL="+f)},postMessage:function(msg){parentPort.postMessage(msg)},performance:global.performance||{now:function(){return Date.now()}}})}var initializedJS=false;var pendingNotifiedProxyingQueues=[];function threadPrintErr(){var text=Array.prototype.slice.call(arguments).join(" ");if(ENVIRONMENT_IS_NODE){fs.writeSync(2,text+"\n");return}console.error(text)}function threadAlert(){var text=Array.prototype.slice.call(arguments).join(" ");postMessage({cmd:"alert",text:text,threadId:Module["_pthread_self"]()})}var err=threadPrintErr;self.alert=threadAlert;Module["instantiateWasm"]=(info,receiveInstance)=>{var module=Module["wasmModule"];Module["wasmModule"]=null;var instance=new WebAssembly.Instance(module,info);return receiveInstance(instance)};self.onunhandledrejection=e=>{throw e.reason??e};function handleMessage(e){try{if(e.data.cmd==="load"){let messageQueue=[];self.onmessage=e=>messageQueue.push(e);self.startWorker=instance=>{Module=instance;postMessage({"cmd":"loaded"});for(let msg of messageQueue){handleMessage(msg)}self.onmessage=handleMessage};Module["wasmModule"]=e.data.wasmModule;for(const handler of e.data.handlers){Module[handler]=function(){postMessage({cmd:"callHandler",handler:handler,args:[...arguments]})}}Module["wasmMemory"]=e.data.wasmMemory;Module["buffer"]=Module["wasmMemory"].buffer;Module["ENVIRONMENT_IS_PTHREAD"]=true;if(typeof e.data.urlOrBlob=="string"){importScripts(e.data.urlOrBlob)}else{var objectUrl=URL.createObjectURL(e.data.urlOrBlob);importScripts(objectUrl);URL.revokeObjectURL(objectUrl)}skwasm(Module)}else if(e.data.cmd==="run"){Module["__emscripten_thread_init"](e.data.pthread_ptr,0,0,1);Module["establishStackSpace"]();Module["PThread"].receiveObjectTransfer(e.data);Module["PThread"].threadInitTLS();if(!initializedJS){pendingNotifiedProxyingQueues.forEach(queue=>{Module["executeNotifiedProxyingQueue"](queue)});pendingNotifiedProxyingQueues=[];initializedJS=true}try{Module["invokeEntryPoint"](e.data.start_routine,e.data.arg)}catch(ex){if(ex!="unwind"){throw ex}}}else if(e.data.cmd==="cancel"){if(Module["_pthread_self"]()){Module["__emscripten_thread_exit"](-1)}}else if(e.data.target==="setimmediate"){}else if(e.data.cmd==="processProxyingQueue"){if(initializedJS){Module["executeNotifiedProxyingQueue"](e.data.queue)}else{pendingNotifiedProxyingQueues.push(e.data.queue)}}else if(e.data.cmd){err("worker.js received unknown command "+e.data.cmd);err(e.data)}}catch(ex){if(Module["__emscripten_thread_crashed"]){Module["__emscripten_thread_crashed"]()}throw ex}}self.onmessage=handleMessage;
This diff is collapsed.
'use strict';
const MANIFEST = 'flutter-app-manifest';
const TEMP = 'flutter-temp-cache';
const CACHE_NAME = 'flutter-app-cache';
const RESOURCES = {"assets/AssetManifest.bin": "65e028717d32de5857ab089092b00784",
"assets/AssetManifest.json": "ee6d3985235c95aed3f5b48d9a3e5964",
"assets/assets/contact_avatar.png": "412e3e7cbcf481d23f2f14bd39ca0eb1",
"assets/assets/loading.json": "d244b45026f841a1379c4c9215a74be7",
"assets/assets/mymeetinglogo.png": "adf31f515626b9f0d1eb113ad15c368b",
"assets/FontManifest.json": "dc3d03800ccca4601324923c0b1d6d57",
"assets/fonts/MaterialIcons-Regular.otf": "46b86def3eae4dc2e79ecf631ac0e13a",
"assets/NOTICES": "c5db294b78fb1920ee4ffd78b116d13c",
"assets/packages/cupertino_icons/assets/CupertinoIcons.ttf": "89ed8f4e49bcdfc0b5bfc9b24591e347",
"assets/shaders/ink_sparkle.frag": "f8b80e740d33eb157090be4e995febdf",
"canvaskit/canvaskit.js": "bbf39143dfd758d8d847453b120c8ebb",
"canvaskit/canvaskit.wasm": "42df12e09ecc0d5a4a34a69d7ee44314",
"canvaskit/chromium/canvaskit.js": "96ae916cd2d1b7320fff853ee22aebb0",
"canvaskit/chromium/canvaskit.wasm": "be0e3b33510f5b7b0cc76cc4d3e50048",
"canvaskit/skwasm.js": "95f16c6690f955a45b2317496983dbe9",
"canvaskit/skwasm.wasm": "1a074e8452fe5e0d02b112e22cdcf455",
"canvaskit/skwasm.worker.js": "51253d3321b11ddb8d73fa8aa87d3b15",
"favicon.png": "c237f3bfe305044077ff4bd2e7805651",
"flutter.js": "6b515e434cea20006b3ef1726d2c8894",
"icons/Icon-192.png": "8492e98f9e23d2757c184a797dd98562",
"icons/Icon-512.png": "3f113298f30f1c8dc1c1ee492b49dd34",
"icons/Icon-maskable-192.png": "8492e98f9e23d2757c184a797dd98562",
"icons/Icon-maskable-512.png": "3f113298f30f1c8dc1c1ee492b49dd34",
"index.html": "c8e2a763855628ae3ccefec432464163",
"/": "c8e2a763855628ae3ccefec432464163",
"main.dart.js": "1474fb5188b446ee4db717c2cf1596df",
"manifest.json": "06a98e3db4ad33d77b572058d067487e",
"version.json": "78ebccf0708fa628ba423077e482533d"};
// The application shell files that are downloaded before a service worker can
// start.
const CORE = ["main.dart.js",
"index.html",
"assets/AssetManifest.json",
"assets/FontManifest.json"];
// During install, the TEMP cache is populated with the application shell files.
self.addEventListener("install", (event) => {
self.skipWaiting();
return event.waitUntil(
caches.open(TEMP).then((cache) => {
return cache.addAll(
CORE.map((value) => new Request(value, {'cache': 'reload'})));
})
);
});
// During activate, the cache is populated with the temp files downloaded in
// install. If this service worker is upgrading from one with a saved
// MANIFEST, then use this to retain unchanged resource files.
self.addEventListener("activate", function(event) {
return event.waitUntil(async function() {
try {
var contentCache = await caches.open(CACHE_NAME);
var tempCache = await caches.open(TEMP);
var manifestCache = await caches.open(MANIFEST);
var manifest = await manifestCache.match('manifest');
// When there is no prior manifest, clear the entire cache.
if (!manifest) {
await caches.delete(CACHE_NAME);
contentCache = await caches.open(CACHE_NAME);
for (var request of await tempCache.keys()) {
var response = await tempCache.match(request);
await contentCache.put(request, response);
}
await caches.delete(TEMP);
// Save the manifest to make future upgrades efficient.
await manifestCache.put('manifest', new Response(JSON.stringify(RESOURCES)));
// Claim client to enable caching on first launch
self.clients.claim();
return;
}
var oldManifest = await manifest.json();
var origin = self.location.origin;
for (var request of await contentCache.keys()) {
var key = request.url.substring(origin.length + 1);
if (key == "") {
key = "/";
}
// If a resource from the old manifest is not in the new cache, or if
// the MD5 sum has changed, delete it. Otherwise the resource is left
// in the cache and can be reused by the new service worker.
if (!RESOURCES[key] || RESOURCES[key] != oldManifest[key]) {
await contentCache.delete(request);
}
}
// Populate the cache with the app shell TEMP files, potentially overwriting
// cache files preserved above.
for (var request of await tempCache.keys()) {
var response = await tempCache.match(request);
await contentCache.put(request, response);
}
await caches.delete(TEMP);
// Save the manifest to make future upgrades efficient.
await manifestCache.put('manifest', new Response(JSON.stringify(RESOURCES)));
// Claim client to enable caching on first launch
self.clients.claim();
return;
} catch (err) {
// On an unhandled exception the state of the cache cannot be guaranteed.
console.error('Failed to upgrade service worker: ' + err);
await caches.delete(CACHE_NAME);
await caches.delete(TEMP);
await caches.delete(MANIFEST);
}
}());
});
// The fetch handler redirects requests for RESOURCE files to the service
// worker cache.
self.addEventListener("fetch", (event) => {
if (event.request.method !== 'GET') {
return;
}
var origin = self.location.origin;
var key = event.request.url.substring(origin.length + 1);
// Redirect URLs to the index.html
if (key.indexOf('?v=') != -1) {
key = key.split('?v=')[0];
}
if (event.request.url == origin || event.request.url.startsWith(origin + '/#') || key == '') {
key = '/';
}
// If the URL is not the RESOURCE list then return to signal that the
// browser should take over.
if (!RESOURCES[key]) {
return;
}
// If the URL is the index.html, perform an online-first request.
if (key == '/') {
return onlineFirst(event);
}
event.respondWith(caches.open(CACHE_NAME)
.then((cache) => {
return cache.match(event.request).then((response) => {
// Either respond with the cached resource, or perform a fetch and
// lazily populate the cache only if the resource was successfully fetched.
return response || fetch(event.request).then((response) => {
if (response && Boolean(response.ok)) {
cache.put(event.request, response.clone());
}
return response;
});
})
})
);
});
self.addEventListener('message', (event) => {
// SkipWaiting can be used to immediately activate a waiting service worker.
// This will also require a page refresh triggered by the main worker.
if (event.data === 'skipWaiting') {
self.skipWaiting();
return;
}
if (event.data === 'downloadOffline') {
downloadOffline();
return;
}
});
// Download offline will check the RESOURCES for all files not in the cache
// and populate them.
async function downloadOffline() {
var resources = [];
var contentCache = await caches.open(CACHE_NAME);
var currentContent = {};
for (var request of await contentCache.keys()) {
var key = request.url.substring(origin.length + 1);
if (key == "") {
key = "/";
}
currentContent[key] = true;
}
for (var resourceKey of Object.keys(RESOURCES)) {
if (!currentContent[resourceKey]) {
resources.push(resourceKey);
}
}
return contentCache.addAll(resources);
}
// Attempt to download the resource online before falling back to
// the offline cache.
function onlineFirst(event) {
return event.respondWith(
fetch(event.request).then((response) => {
return caches.open(CACHE_NAME).then((cache) => {
cache.put(event.request, response.clone());
return response;
});
}).catch((error) => {
return caches.open(CACHE_NAME).then((cache) => {
return cache.match(event.request).then((response) => {
if (response != null) {
return response;
}
throw error;
});
});
})
);
}
<!DOCTYPE html>
<html>
<head>
<!--
If you are serving your web app in a path other than the root, change the
href value below to reflect the base path you are serving from.
The path provided below has to start and end with a slash "/" in order for
it to work correctly.
For more details:
* https://developer.mozilla.org/en-US/docs/Web/HTML/Element/base
This is a placeholder for base href that will be replaced by the value of
the `--base-href` argument provided to `flutter build`.
-->
<base href="/">
<meta charset="UTF-8">
<meta content="IE=Edge" http-equiv="X-UA-Compatible">
<meta name="description" content="A new Flutter project.">
<!-- iOS meta tags & icons -->
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-status-bar-style" content="black">
<meta name="apple-mobile-web-app-title" content="vmeeting">
<link rel="apple-touch-icon" href="icons/Icon-192.png">
<!-- Favicon -->
<link rel="icon" type="image/png" href="favicon.png"/>
<title>vmeeting</title>
<link rel="manifest" href="manifest.json">
<script>
// The value below is injected by flutter build, do not touch.
const serviceWorkerVersion = "1833530226";
</script>
<!-- This script adds the flutter initialization JS code -->
<script src="flutter.js" defer></script>
</head>
<body>
<script>
window.addEventListener('load', function(ev) {
// Download main.dart.js
_flutter.loader.loadEntrypoint({
serviceWorker: {
serviceWorkerVersion: serviceWorkerVersion,
},
onEntrypointLoaded: function(engineInitializer) {
engineInitializer.initializeEngine().then(function(appRunner) {
appRunner.runApp();
});
}
});
});
</script>
</body>
</html>
This diff is collapsed.
{
"name": "vmeeting",
"short_name": "vmeeting",
"start_url": ".",
"display": "standalone",
"background_color": "#0175C2",
"theme_color": "#0175C2",
"description": "A new Flutter project.",
"orientation": "portrait-primary",
"prefer_related_applications": false,
"icons": [
{
"src": "icons/Icon-192.png",
"sizes": "192x192",
"type": "image/png"
},
{
"src": "icons/Icon-512.png",
"sizes": "512x512",
"type": "image/png"
},
{
"src": "icons/Icon-maskable-192.png",
"sizes": "192x192",
"type": "image/png",
"purpose": "maskable"
},
{
"src": "icons/Icon-maskable-512.png",
"sizes": "512x512",
"type": "image/png",
"purpose": "maskable"
}
]
}
{"app_name":"vmeeting","version":"1.0.0","build_number":"1","package_name":"vmeeting"}
\ No newline at end of file
import 'package:bloc/bloc.dart';
import 'package:connectycube_sdk/connectycube_calls.dart';
import 'package:equatable/equatable.dart';
import 'package:meta/meta.dart';
import 'package:vmeeting/service/user_repositores/user_repo.dart';
import '../../src/utils/app_utils.dart';
part 'edit_profile_event.dart';
part 'edit_profile_state.dart';
class EditProfileBloc extends Bloc<EditProfileEvent, EditProfileState> {
EditProfileBloc() : super(EditProfileInitialState()) {
on<EditProfileEvent>((event, emit) {
emit(EditProfileLoadedState(user: AppUtils.cubeUser));
});
on<EditProfileUpdateEvent>((event, emit) async {
try{
await UserRepository.getInstance().updateUserProfile(event.user ?? CubeUser());
emit(EditProfileLoadedState(user: AppUtils.cubeUser));
}catch(e){
emit(EditProfileExceptionState(message: e.toString()));
}
});
}
}
part of 'edit_profile_bloc.dart';
@immutable
abstract class EditProfileEvent extends Equatable{}
class EditProfileFetchEvent extends EditProfileEvent{
@override
List<Object?> get props => [];
}
class EditProfileUpdateEvent extends EditProfileEvent{
final CubeUser? user;
EditProfileUpdateEvent({this.user});
@override
List<Object?> get props => [user];
}
part of 'edit_profile_bloc.dart';
@immutable
abstract class EditProfileState extends Equatable{}
class EditProfileInitialState extends EditProfileState {
@override
// TODO: implement props
List<Object?> get props => [];
}
class EditProfileLoadedState extends EditProfileState{
final CubeUser user;
EditProfileLoadedState({required this.user});
@override
List<Object?> get props => [user];
}
class EditProfileExceptionState extends EditProfileState{
final String message;
EditProfileExceptionState({required this.message});
@override
List<Object?> get props => [message];
}
\ No newline at end of file
...@@ -35,11 +35,11 @@ class _AppState extends State<App> { ...@@ -35,11 +35,11 @@ class _AppState extends State<App> {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return (!kIsWeb ) return (!kIsWeb)
? StreamBuilder( ? StreamBuilder(
stream: controller.outputTheme, stream: controller.outputTheme,
initialData: false, initialData: false,
builder: (BuildContext context, snapshot){ builder: (BuildContext context, snapshot) {
return MaterialApp( return MaterialApp(
debugShowCheckedModeBanner: false, debugShowCheckedModeBanner: false,
theme: getAppTheme(context, snapshot.data ?? false), theme: getAppTheme(context, snapshot.data ?? false),
...@@ -55,11 +55,11 @@ class _AppState extends State<App> { ...@@ -55,11 +55,11 @@ class _AppState extends State<App> {
fontWeight: FontWeight.w600, fontWeight: FontWeight.w600,
fontStyle: FontStyle.normal), fontStyle: FontStyle.normal),
durationUntilAlertAgain: const Duration(days: 1), durationUntilAlertAgain: const Duration(days: 1),
dialogStyle: Platform.isIOS ? UpgradeDialogStyle.cupertino : UpgradeDialogStyle.material dialogStyle: Platform.isIOS
), ? UpgradeDialogStyle.cupertino
: UpgradeDialogStyle.material),
child: MainNavigator(controller: controller), child: MainNavigator(controller: controller),
) ));
);
}) })
: MaterialApp( : MaterialApp(
debugShowCheckedModeBanner: false, debugShowCheckedModeBanner: false,
...@@ -71,7 +71,6 @@ class _AppState extends State<App> { ...@@ -71,7 +71,6 @@ class _AppState extends State<App> {
navigatorKey: App.navigationService.navigatorKey, navigatorKey: App.navigationService.navigatorKey,
home: MainNavigator(controller: controller), home: MainNavigator(controller: controller),
); );
} }
@override @override
......
...@@ -2,12 +2,14 @@ ...@@ -2,12 +2,14 @@
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:flutter_bloc/flutter_bloc.dart'; import 'package:flutter_bloc/flutter_bloc.dart';
import 'package:vmeeting/blocs/edit_profile_bloc/edit_profile_bloc.dart';
import 'package:vmeeting/blocs/user_sign_up_bloc/user_sign_up_bloc.dart'; import 'package:vmeeting/blocs/user_sign_up_bloc/user_sign_up_bloc.dart';
import 'package:vmeeting/service/routes/routes_name.dart'; import 'package:vmeeting/service/routes/routes_name.dart';
import 'package:vmeeting/views/main_view/main_page.dart'; import 'package:vmeeting/views/main_view/main_page.dart';
import '../../blocs/user_login_bloc/user_log_in_bloc.dart'; import '../../blocs/user_login_bloc/user_log_in_bloc.dart';
import '../../src/controllers/enter_number_cont.dart'; import '../../src/controllers/enter_number_cont.dart';
import '../../src/login_screen.dart'; import '../../src/login_screen.dart';
import '../../views/edit_profile_view/edit_profile_page.dart';
import '../../views/signin_view/signin_page.dart'; import '../../views/signin_view/signin_page.dart';
import '../../views/signup_view/signup_page.dart'; import '../../views/signup_view/signup_page.dart';
import '../../views/splash_view/splash_screen.dart'; import '../../views/splash_view/splash_screen.dart';
...@@ -64,6 +66,16 @@ class MainNavigator extends StatelessWidget { ...@@ -64,6 +66,16 @@ class MainNavigator extends StatelessWidget {
child: UserSignInPage(controller: controller), child: UserSignInPage(controller: controller),
); );
break; break;
case MainRoutes.edit_profile_page:
builder = (BuildContext _) => MultiBlocProvider(
providers: [
BlocProvider<EditProfileBloc>(
create: (context) => EditProfileBloc(),
),
],
child: EditProfilePage(controller: controller),
);
break;
} }
if (builder != null) { if (builder != null) {
return MaterialPageRoute(builder: builder, settings: settings); return MaterialPageRoute(builder: builder, settings: settings);
......
...@@ -6,4 +6,5 @@ class MainRoutes { ...@@ -6,4 +6,5 @@ class MainRoutes {
static const String main_page = "main_page"; static const String main_page = "main_page";
static const String sign_in_page = "sign_in_page"; static const String sign_in_page = "sign_in_page";
static const String old_sign_in = "old_sign_in"; static const String old_sign_in = "old_sign_in";
static const String edit_profile_page = "edit_profile_page";
} }
\ No newline at end of file
import 'package:connectycube_sdk/connectycube_calls.dart'; import 'package:connectycube_sdk/connectycube_calls.dart';
import 'package:connectycube_sdk/connectycube_chat.dart'; import 'package:connectycube_sdk/connectycube_chat.dart';
import 'package:connectycube_sdk/connectycube_storage.dart';
import 'package:flutter/cupertino.dart'; import 'package:flutter/cupertino.dart';
import 'package:universal_io/io.dart';
import 'package:vmeeting/src/controllers/enter_number_cont.dart'; import 'package:vmeeting/src/controllers/enter_number_cont.dart';
import 'package:vmeeting/src/utils/app_utils.dart'; import 'package:vmeeting/src/utils/app_utils.dart';
import '../../app_models/app_users_model/app_users_model.dart'; import '../../app_models/app_users_model/app_users_model.dart';
...@@ -35,7 +37,7 @@ class UserRepository { ...@@ -35,7 +37,7 @@ class UserRepository {
_loginToCubeChat(context, userss,controller); _loginToCubeChat(context, userss,controller);
}).catchError((exception) { }).catchError((exception) {
controller.inputElevatedButton.add(false); controller.inputElevatedButton.add(false);
errorMessage(context); errorMessage(context," ConnectyCube 11");
}); });
} }
return isChaking; return isChaking;
...@@ -47,8 +49,8 @@ class UserRepository { ...@@ -47,8 +49,8 @@ class UserRepository {
controller.inputElevatedButton.add(false); controller.inputElevatedButton.add(false);
Navigator.pushReplacementNamed(context, MainRoutes.main_page); Navigator.pushReplacementNamed(context, MainRoutes.main_page);
}).catchError((exception) { }).catchError((exception) {
controller.inputElevatedButton.add(false); Navigator.pushReplacementNamed(context, MainRoutes.sign_in_page);
errorMessage(context); errorMessage(context," ConnectyCube 22");
}); });
} }
...@@ -65,7 +67,7 @@ class UserRepository { ...@@ -65,7 +67,7 @@ class UserRepository {
}) })
.catchError((error){ .catchError((error){
controller.inputElevatedButton.add(false); controller.inputElevatedButton.add(false);
errorMessage(context); errorMessage(context, " ConnectyCube 33");
print(error); print(error);
}); });
} }
...@@ -83,7 +85,7 @@ class UserRepository { ...@@ -83,7 +85,7 @@ class UserRepository {
login: item.login, login: item.login,
id: item.id, id: item.id,
avatar: item.avatar, avatar: item.avatar,
createdAt: item.createdAt?.timeZoneName, createdAt: item.createdAt?.toIso8601String(),
customData: item.customData, customData: item.customData,
externalId: item.externalId.toString(), externalId: item.externalId.toString(),
externalUserId: item.externalUserId.toString(), externalUserId: item.externalUserId.toString(),
...@@ -100,9 +102,9 @@ class UserRepository { ...@@ -100,9 +102,9 @@ class UserRepository {
return appUsersModelList; return appUsersModelList;
} }
Future<void> getUserProfile(BuildContext context) async { Future<void> getUserProfile(BuildContext context, String userLogin) async {
String login = "Inomjon2000"; getUserByLogin(userLogin).then((cubeUser) {
getUserByLogin(login).then((cubeUser) { AppUtils.cubeUser = cubeUser ?? CubeUser();
AppUtils.userModel = UserModel( AppUtils.userModel = UserModel(
login: cubeUser?.login ?? "", login: cubeUser?.login ?? "",
sId: cubeUser?.id.toString(), sId: cubeUser?.id.toString(),
...@@ -123,11 +125,50 @@ class UserRepository { ...@@ -123,11 +125,50 @@ class UserRepository {
updatedAt: cubeUser?.updatedAt?.toIso8601String() ?? "", updatedAt: cubeUser?.updatedAt?.toIso8601String() ?? "",
website: cubeUser?.website.toString() ?? "" website: cubeUser?.website.toString() ?? ""
); );
})
.catchError((error) {
errorMessage(context," ConnectyCube 44");
});
}
Future<void> uploadAvatar({required BuildContext context, required File file}) async {
SharedPrefs.getUser().then((loggedUser) async {
await uploadFile(file, isPublic: false).then((cubeFile) {
loggedUser?.avatar = cubeFile.uid;
loggedUser?.fullName = AppUtils.userModel.fullName;
AppUtils.showSnackBar(context, "Image uploaded 👍");
return updateUser(loggedUser!);
}) })
.catchError((error) { .catchError((error) {
errorMessage(context); errorMessage(context, "Something went wrong");
}); });
});
}
Future<void> updateUserProfile(CubeUser user) async {
updateUser(user).then((updatedUser) {
AppUtils.cubeUser = updatedUser;
AppUtils.userModel = UserModel(
login: updatedUser.login ?? "",
sId: updatedUser.id.toString(),
phone: updatedUser.phone ?? "",
lastRequestAt: updatedUser.lastRequestAt?.toIso8601String() ?? "",
isGuest: updatedUser.isGuest.toString(),
facebookId: updatedUser.facebookId ?? "",
externalUserId: updatedUser.externalUserId ?? "",
externalId: updatedUser.externalId.toString(),
customData: updatedUser.customData ?? "",
createdAt: updatedUser.createdAt?.toIso8601String() ?? "",
avatar: updatedUser.avatar ?? "",
id: updatedUser.id,
email: updatedUser.email ?? "",
fullName: updatedUser.fullName ?? "",
timezone: updatedUser.timeZone.toString(),
twitterId: updatedUser.twitterId ?? "",
updatedAt: updatedUser.updatedAt?.toIso8601String() ?? "",
website: updatedUser.website.toString() ?? ""
);
}).catchError((error) {});
} }
......
...@@ -15,10 +15,9 @@ import 'package:vmeeting/src/constants/colors_const.dart'; ...@@ -15,10 +15,9 @@ import 'package:vmeeting/src/constants/colors_const.dart';
thumbColor: MaterialStateProperty.all( thumbColor: MaterialStateProperty.all(
idDark ? Colors.orange : Colors.purple), idDark ? Colors.orange : Colors.purple),
), ),
listTileTheme: ListTileThemeData( listTileTheme: ListTileThemeData(iconColor: idDark ? Colors.orange : Colors.purple),
iconColor: idDark ? Colors.orange : Colors.purple),
appBarTheme: AppBarTheme( appBarTheme: AppBarTheme(
backgroundColor: idDark ? ColorConst.appMainBackgroundColor : ColorConst.appSecondWhiteColor, backgroundColor: idDark ? ColorConst.appMainBackgroundColor : ColorConst.appSecondWhiteColor,
iconTheme: IconThemeData(color: idDark ? ColorConst.appMainBackgroundColor : ColorConst.appSecondWhiteColor,)), iconTheme: IconThemeData(color: idDark ? ColorConst.appMainBackgroundColor : ColorConst.appBleckColor,)),
); );
} }
\ No newline at end of file
import 'package:connectycube_sdk/connectycube_calls.dart';
import 'package:flutter/cupertino.dart'; import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:google_fonts/google_fonts.dart'; import 'package:google_fonts/google_fonts.dart';
...@@ -34,5 +35,6 @@ class AppUtils { ...@@ -34,5 +35,6 @@ class AppUtils {
ScaffoldMessenger.of(context).showSnackBar(snackdemo); ScaffoldMessenger.of(context).showSnackBar(snackdemo);
} }
static UserModel userModel = UserModel(); static UserModel userModel = UserModel();
static CubeUser cubeUser = CubeUser();
} }
...@@ -5,7 +5,7 @@ import '../constants/colors_const.dart'; ...@@ -5,7 +5,7 @@ import '../constants/colors_const.dart';
import '../widgets/big_text_widget.dart'; import '../widgets/big_text_widget.dart';
import '../widgets/small_text.dart'; import '../widgets/small_text.dart';
void errorMessage(BuildContext context) async { void errorMessage(BuildContext context, String message) async {
showDialog( showDialog(
context: context, context: context,
builder: (BuildContext context) { builder: (BuildContext context) {
...@@ -39,7 +39,7 @@ void errorMessage(BuildContext context) async { ...@@ -39,7 +39,7 @@ void errorMessage(BuildContext context) async {
), ),
], ],
), ),
SmallText(text: "Something went wrong during login to ConnectyCube", SmallText(text: message,
fontWidget: FontWeight.bold, fontWidget: FontWeight.bold,
size: context.h*0.02, size: context.h*0.02,
textAlign: TextAlign.center,), textAlign: TextAlign.center,),
......
import 'package:connectycube_sdk/connectycube_chat.dart'; import 'package:connectycube_sdk/connectycube_chat.dart';
import 'package:connectycube_sdk/connectycube_sdk.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:vmeeting/src/extension/context_extensions.dart'; import 'package:vmeeting/src/extension/context_extensions.dart';
import '../../service/routes/routes_name.dart'; import '../../service/routes/routes_name.dart';
...@@ -63,7 +64,7 @@ class _DrawerMenueState extends State<DrawerMenue> { ...@@ -63,7 +64,7 @@ class _DrawerMenueState extends State<DrawerMenue> {
return Center( return Center(
child: AvatarImage( child: AvatarImage(
radius: context.h * 0.08, radius: context.h * 0.08,
imagePath: imagaAvatar, imagePath: getPrivateUrlForUid(imagaAvatar),
)); ));
} }
......
import 'package:connectycube_sdk/connectycube_sdk.dart';
import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
import 'package:flutter_bloc/flutter_bloc.dart';
import 'package:image_picker/image_picker.dart';
import 'package:universal_io/io.dart';
import 'package:vmeeting/blocs/edit_profile_bloc/edit_profile_bloc.dart';
import 'package:vmeeting/service/user_repositores/user_repo.dart';
import 'package:vmeeting/src/controllers/enter_number_cont.dart';
import 'package:vmeeting/src/extension/context_extensions.dart';
import 'package:vmeeting/src/widgets/big_text_widget.dart';
import 'package:vmeeting/src/widgets/small_text.dart';
import '../../service/routes/routes_name.dart';
import '../../src/constants/colors_const.dart';
import '../../src/utils/app_utils.dart';
import '../../src/widgets/custom_loading/customloading.dart';
import '../../src/widgets/exceptions/app_exeptions.dart';
import '../../src/widgets/image_avatar.dart';
import '../../src/widgets/textfiled_widgets/auth_text_fild.dart';
class EditProfilePage extends StatefulWidget {
final NumberController controller;
const EditProfilePage({super.key, required this.controller});
@override
State<EditProfilePage> createState() => _EditProfilePageState();
}
class _EditProfilePageState extends State<EditProfilePage> {
late EditProfileBloc editProfileBloc;
final _loginControlle = TextEditingController(text: AppUtils.userModel.login);
final _loginFocusNode = FocusNode();
final _phoneControlle = TextEditingController(text: AppUtils.userModel.phone);
final _phoneFocusNode = FocusNode();
final _emailControlle = TextEditingController(text: AppUtils.userModel.email);
final _emailFocusNode = FocusNode();
final _fullNameControlle = TextEditingController(text: AppUtils.userModel.fullName);
final _fullNameFocusNode = FocusNode();
@override
void initState() {
super.initState();
editProfileBloc = BlocProvider.of<EditProfileBloc>(context);
editProfileBloc.add(EditProfileFetchEvent());
}
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
elevation: 0,
title: const BigText(text: "Edit profile"),
),
body: BlocConsumer<EditProfileBloc, EditProfileState>(
listener: (context, state) {},
builder: (context, state) {
if (state is EditProfileInitialState) {
return buildLoading();
} else if (state is EditProfileLoadedState) {
return buildUI(state.user);
}
if (state is EditProfileExceptionState) {
return const Center(
child: AppExceptionsWidget(
message: "Exception", authName: MainRoutes.edit_profile_page));
}
return const Center(child: Text("AloVoice"));
},
),
);
}
Widget buildUI(CubeUser cubeUser){
return Container(
margin: EdgeInsets.symmetric(horizontal: context.w * 0.06),
child: SingleChildScrollView(
child: Column(children: [
SizedBox(height: context.h * 0.05),
buildImage(context,cubeUser),
buildTextFiled(cubeUser),
SizedBox(height: context.h * 0.03),
buildButtons(context,cubeUser),
],),
)
);
}
Widget buildTextFiled(CubeUser cubeUser){
return Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
SizedBox(height: context.h * 0.06),
const SmallText(text: "Full Name"),
SizedBox(height: context.h * 0.01),
AuthTextFild(
lableName: "FullName",
borderRadius: 10,
elevation: 1,
color: Colors.grey.withOpacity(0.2),
focusNode: _fullNameFocusNode,
textEditingController: _fullNameControlle,
),
SizedBox(height: context.h * 0.02),
const SmallText(text: "Email"),
SizedBox(height: context.h * 0.01),
AuthTextFild(
lableName: "Email",
borderRadius: 10,
elevation: 1,
color: Colors.grey.withOpacity(0.2),
type: TextInputType.emailAddress,
focusNode: _emailFocusNode,
textEditingController: _emailControlle,
),
SizedBox(height: context.h * 0.02),
const SmallText(text: "Login"),
SizedBox(height: context.h * 0.01),
AuthTextFild(
lableName: "Login",
borderRadius: 10,
elevation: 1,
color: Colors.grey.withOpacity(0.2),
focusNode: _loginFocusNode,
textEditingController: _loginControlle,
),
SizedBox(height: context.h * 0.02),
const SmallText(text: "Phone Number"),
SizedBox(height: context.h * 0.01),
AuthTextFild(
lableName: "Phone Number",
borderRadius: 10,
elevation: 1,
color: Colors.grey.withOpacity(0.2),
focusNode: _phoneFocusNode,
textEditingController: _phoneControlle,
type: TextInputType.phone,
),
SizedBox(height: context.h * 0.01),
],);
}
Widget buildButtons(BuildContext context, CubeUser cubeUser) {
return ElevatedButton(
style: ElevatedButton.styleFrom(
foregroundColor: Colors.white,
backgroundColor: ColorConst.appGreenColor,
disabledForegroundColor: Colors.grey.withOpacity(0.38),
disabledBackgroundColor: Colors.grey.withOpacity(0.12),
),
onPressed: () async {
if(_loginControlle.text.isNotEmpty && _emailControlle.text.isNotEmpty && _fullNameControlle.text.isNotEmpty){
editProfileBloc.add(EditProfileUpdateEvent(
user: CubeUser(
fullName: _fullNameControlle.text,
email: _emailControlle.text,
login: _loginControlle.text,
phone: _phoneControlle.text,
id: cubeUser.id,
)
));
}else{
AppUtils.showSnackBar(context, "PLEASE ENTER THE SAME VALUE AGAIN");
}
},
child: SizedBox(
height: context.h * 0.06,
child: Center(
child: BigText(
text: "Update".toUpperCase(),
fontWidget: FontWeight.bold,
size: 16,
),
),
),
);
}
Widget buildImage(BuildContext context, CubeUser cubeUser) {
return Row(
mainAxisAlignment: MainAxisAlignment.center,
crossAxisAlignment: CrossAxisAlignment.end,
children: [
imageCameraForView == null
? AvatarImage(
radius: context.h * 0.09,
imagePath: getPrivateUrlForUid(cubeUser.avatar),
)
: CircleAvatar(
radius: 70,
backgroundColor: ColorConst.appGreenColor,
backgroundImage: FileImage(imageCameraForView!)),
InkWell(
child: Icon(Icons.edit,size: 30,color: ColorConst.appGreenColor,),
onTap: (){
_onImageButtonPressed(ImageSource.gallery,
context: context);
},
)
],
);
}
File? imageCameraForView;
final ImagePicker _picker = ImagePicker();
Future<void> _onImageButtonPressed(ImageSource source,
{required BuildContext context}) async {
if (mounted) {
{
try {
final XFile? pickedFile = await _picker.pickImage(
source: source,
maxWidth: 480,
maxHeight: 640,
imageQuality: 100,
);
pickImageCameraAndUpload(context, pickedFile);
} on PlatformException catch (e) {
print('Failed to pick image: $e');
}
}
}
}
File? documentFile;
Future<void> pickImageCameraAndUpload(
BuildContext context, XFile? imageCamera) async {
if (imageCamera != null) {
documentFile = File(imageCamera.path);
setState(() {});
Future.delayed(Duration(seconds: 1));
try {
final imageTempCamera = File(imageCamera.path);
setState(() => imageCameraForView = imageTempCamera);
await UserRepository.getInstance().uploadAvatar(file: imageTempCamera, context: context);
} on PlatformException catch (e) {
print('Failed to pick image: $e');
}
}
}
Widget buildLoading() {
return Center(child: CustomLoading());
}
}
import 'package:connectycube_sdk/connectycube_calls.dart'; import 'package:connectycube_sdk/connectycube_calls.dart';
import 'package:connectycube_sdk/connectycube_sdk.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:flutter_bloc/flutter_bloc.dart'; import 'package:flutter_bloc/flutter_bloc.dart';
import 'package:vmeeting/app_models/app_users_model/app_users_model.dart'; import 'package:vmeeting/app_models/app_users_model/app_users_model.dart';
...@@ -101,7 +102,7 @@ class _HomePageState extends State<HomePage> { ...@@ -101,7 +102,7 @@ class _HomePageState extends State<HomePage> {
separatorBuilder: (_, __) => const SizedBox(height: 10), separatorBuilder: (_, __) => const SizedBox(height: 10),
itemCount: appUserModelList.length, itemCount: appUserModelList.length,
itemBuilder: (BuildContext context, int index) => SizedBox( itemBuilder: (BuildContext context, int index) => SizedBox(
height: 100, height: context.h*0.12,
child: DecoratedBox( child: DecoratedBox(
decoration: BoxDecoration( decoration: BoxDecoration(
color: Colors.white, color: Colors.white,
...@@ -115,11 +116,13 @@ class _HomePageState extends State<HomePage> { ...@@ -115,11 +116,13 @@ class _HomePageState extends State<HomePage> {
], ],
), ),
child: Row( child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [ children: [
Expanded(child: Row(children: [
buildImage(context, appUserModelList[index].user?.avatar), buildImage(context, appUserModelList[index].user?.avatar),
SizedBox(width: context.w * 0.02), SizedBox(width: context.w * 0.02),
buildUserName(appUserModelList[index]), buildUserName(appUserModelList[index]),
const Spacer(), ],),),
buildChackBox(appUserModelList[index].user!.id ?? 0), buildChackBox(appUserModelList[index].user!.id ?? 0),
SizedBox(width: context.w * 0.02), SizedBox(width: context.w * 0.02),
], ],
...@@ -147,7 +150,8 @@ class _HomePageState extends State<HomePage> { ...@@ -147,7 +150,8 @@ class _HomePageState extends State<HomePage> {
} }
Widget buildUserName(AppUsersModel appUsersModel) { Widget buildUserName(AppUsersModel appUsersModel) {
return Column( return Flexible(
child: Column(
children: [ children: [
SizedBox(height: context.h*0.01), SizedBox(height: context.h*0.01),
Column( Column(
...@@ -155,12 +159,15 @@ class _HomePageState extends State<HomePage> { ...@@ -155,12 +159,15 @@ class _HomePageState extends State<HomePage> {
children: [ children: [
SmallText(text: appUsersModel.user?.fullName ?? "",fontWidget: FontWeight.bold,), SmallText(text: appUsersModel.user?.fullName ?? "",fontWidget: FontWeight.bold,),
SizedBox(height: context.h*0.005), SizedBox(height: context.h*0.005),
SmallText(text: appUsersModel.user?.email ?? "", size: context.h*0.015), SmallText(text: appUsersModel.user?.email ?? "", size: context.h*0.017),
SizedBox(height: context.h*0.005), SizedBox(height: context.h*0.005),
SmallText(text: appUsersModel.user?.phone ?? ""), SmallText(text: appUsersModel.user?.phone ?? ""),
SizedBox(height: context.h*0.005),
SmallText(text: appUsersModel.user?.id.toString() ?? ""),
], ],
), ),
], ],
)
); );
} }
...@@ -168,7 +175,7 @@ class _HomePageState extends State<HomePage> { ...@@ -168,7 +175,7 @@ class _HomePageState extends State<HomePage> {
return Center( return Center(
child: AvatarImage( child: AvatarImage(
radius: context.h * 0.06, radius: context.h * 0.06,
imagePath: imagaAvatar, imagePath: getPrivateUrlForUid(imagaAvatar),
)); ));
} }
......
...@@ -8,6 +8,7 @@ import 'package:vmeeting/views/profile_view/profile_page.dart'; ...@@ -8,6 +8,7 @@ import 'package:vmeeting/views/profile_view/profile_page.dart';
import 'package:vmeeting/views/users_view/users_page.dart'; import 'package:vmeeting/views/users_view/users_page.dart';
import '../../service/user_repositores/user_repo.dart'; import '../../service/user_repositores/user_repo.dart';
import '../../src/constants/colors_const.dart'; import '../../src/constants/colors_const.dart';
import '../../src/utils/pref_util.dart';
import '../../src/widgets/appbar_animation_widgets/icon_painters/category_icon_painter.dart'; import '../../src/widgets/appbar_animation_widgets/icon_painters/category_icon_painter.dart';
import '../../src/widgets/appbar_animation_widgets/sliver_scaffold.dart'; import '../../src/widgets/appbar_animation_widgets/sliver_scaffold.dart';
import '../drower_view/drower_menue.dart'; import '../drower_view/drower_menue.dart';
...@@ -42,7 +43,11 @@ class _MainPageState extends State<MainPage> { ...@@ -42,7 +43,11 @@ class _MainPageState extends State<MainPage> {
} }
@override @override
void initState() { void initState() {
UserRepository.getInstance().getUserProfile(context); SharedPrefs.getUser().then((loggedUser) {
if (loggedUser != null) {
UserRepository.getInstance().getUserProfile(context,loggedUser.login ?? "");
}
});
super.initState(); super.initState();
} }
......
import 'package:connectycube_sdk/connectycube_sdk.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:vmeeting/service/routes/routes_name.dart';
import 'package:vmeeting/src/extension/context_extensions.dart'; import 'package:vmeeting/src/extension/context_extensions.dart';
import 'package:vmeeting/src/widgets/small_text.dart'; import 'package:vmeeting/src/widgets/small_text.dart';
import '../../src/constants/colors_const.dart'; import '../../src/constants/colors_const.dart';
...@@ -24,7 +26,7 @@ class ProfilePage extends StatelessWidget { ...@@ -24,7 +26,7 @@ class ProfilePage extends StatelessWidget {
child: SingleChildScrollView( child: SingleChildScrollView(
child: Column( child: Column(
children: [ children: [
buildImage(context,AppUtils.userModel.avatar), buildImage(context),
SizedBox(height: context.h * 0.06), SizedBox(height: context.h * 0.06),
buildDetails(context), buildDetails(context),
], ],
...@@ -34,6 +36,8 @@ class ProfilePage extends StatelessWidget { ...@@ -34,6 +36,8 @@ class ProfilePage extends StatelessWidget {
} }
Widget buildDetails(BuildContext context) { Widget buildDetails(BuildContext context) {
DateTime? createdAt = DateTime.parse(AppUtils.userModel.createdAt.toString());
final result = '${createdAt.year}-${createdAt.month}-${createdAt.day} / ${createdAt.hour}:${createdAt.minute}:${createdAt.second}';
return Column( return Column(
children: [ children: [
Container( Container(
...@@ -71,7 +75,19 @@ class ProfilePage extends StatelessWidget { ...@@ -71,7 +75,19 @@ class ProfilePage extends StatelessWidget {
), ),
), ),
), ),
SizedBox(height: context.h * 0.12), SizedBox(height: context.h * 0.03),
Container(
height: context.h * 0.06,
decoration: BoxDecoration(
color: ColorConst.appBackgroundColor,
borderRadius: BorderRadius.circular(12)),
child: Center(
child: SmallText(
text: result.toString(),
),
),
),
SizedBox(height: context.h * 0.1),
buildButtons(context), buildButtons(context),
], ],
); );
...@@ -85,9 +101,11 @@ class ProfilePage extends StatelessWidget { ...@@ -85,9 +101,11 @@ class ProfilePage extends StatelessWidget {
disabledForegroundColor: Colors.grey.withOpacity(0.38), disabledForegroundColor: Colors.grey.withOpacity(0.38),
disabledBackgroundColor: Colors.grey.withOpacity(0.12), disabledBackgroundColor: Colors.grey.withOpacity(0.12),
), ),
onPressed: () async {}, onPressed: () async {
final response = Navigator.pushNamed(context, MainRoutes.edit_profile_page);
},
child: SizedBox( child: SizedBox(
width: context.w * 0.8,
height: context.h * 0.06, height: context.h * 0.06,
child: Center( child: Center(
child: BigText( child: BigText(
...@@ -100,11 +118,11 @@ class ProfilePage extends StatelessWidget { ...@@ -100,11 +118,11 @@ class ProfilePage extends StatelessWidget {
); );
} }
Widget buildImage(BuildContext context, String? imagaAvatar) { Widget buildImage(BuildContext context,) {
return Center( return Center(
child: AvatarImage( child: AvatarImage(
radius: context.h * 0.09, radius: context.h * 0.09,
imagePath: imagaAvatar, imagePath: getPrivateUrlForUid(AppUtils.userModel.avatar),
)); ));
} }
} }
...@@ -72,7 +72,7 @@ class _UserSignInPageState extends State<UserSignInPage> { ...@@ -72,7 +72,7 @@ class _UserSignInPageState extends State<UserSignInPage> {
child: Column( child: Column(
children: [ children: [
SizedBox(height: context.h * 0.06), SizedBox(height: context.h * 0.06),
Row( const Row(
mainAxisAlignment: MainAxisAlignment.end, mainAxisAlignment: MainAxisAlignment.end,
children: [ children: [
// Switch.adaptive( // Switch.adaptive(
...@@ -146,7 +146,6 @@ class _UserSignInPageState extends State<UserSignInPage> { ...@@ -146,7 +146,6 @@ class _UserSignInPageState extends State<UserSignInPage> {
}, },
child: SizedBox( child: SizedBox(
width: context.w * 0.8,
height: context.h * 0.06, height: context.h * 0.06,
child: Center( child: Center(
child: snapshot.data ?? false child: snapshot.data ?? false
......
...@@ -172,7 +172,6 @@ class _UserSignUpPageState extends State<UserSignUpPage> { ...@@ -172,7 +172,6 @@ class _UserSignUpPageState extends State<UserSignUpPage> {
}, },
child: SizedBox( child: SizedBox(
width: context.w * 0.8,
height: context.h * 0.06, height: context.h * 0.06,
child: Center( child: Center(
child: snapshot.data ?? false child: snapshot.data ?? false
......
...@@ -6,10 +6,14 @@ ...@@ -6,10 +6,14 @@
#include "generated_plugin_registrant.h" #include "generated_plugin_registrant.h"
#include <file_selector_linux/file_selector_plugin.h>
#include <flutter_webrtc/flutter_web_r_t_c_plugin.h> #include <flutter_webrtc/flutter_web_r_t_c_plugin.h>
#include <url_launcher_linux/url_launcher_plugin.h> #include <url_launcher_linux/url_launcher_plugin.h>
void fl_register_plugins(FlPluginRegistry* registry) { void fl_register_plugins(FlPluginRegistry* registry) {
g_autoptr(FlPluginRegistrar) file_selector_linux_registrar =
fl_plugin_registry_get_registrar_for_plugin(registry, "FileSelectorPlugin");
file_selector_plugin_register_with_registrar(file_selector_linux_registrar);
g_autoptr(FlPluginRegistrar) flutter_webrtc_registrar = g_autoptr(FlPluginRegistrar) flutter_webrtc_registrar =
fl_plugin_registry_get_registrar_for_plugin(registry, "FlutterWebRTCPlugin"); fl_plugin_registry_get_registrar_for_plugin(registry, "FlutterWebRTCPlugin");
flutter_web_r_t_c_plugin_register_with_registrar(flutter_webrtc_registrar); flutter_web_r_t_c_plugin_register_with_registrar(flutter_webrtc_registrar);
......
...@@ -3,6 +3,7 @@ ...@@ -3,6 +3,7 @@
# #
list(APPEND FLUTTER_PLUGIN_LIST list(APPEND FLUTTER_PLUGIN_LIST
file_selector_linux
flutter_webrtc flutter_webrtc
url_launcher_linux url_launcher_linux
) )
......
...@@ -6,6 +6,7 @@ import FlutterMacOS ...@@ -6,6 +6,7 @@ import FlutterMacOS
import Foundation import Foundation
import device_info_plus import device_info_plus
import file_selector_macos
import firebase_core import firebase_core
import flutter_webrtc import flutter_webrtc
import package_info_plus import package_info_plus
...@@ -15,6 +16,7 @@ import url_launcher_macos ...@@ -15,6 +16,7 @@ import url_launcher_macos
func RegisterGeneratedPlugins(registry: FlutterPluginRegistry) { func RegisterGeneratedPlugins(registry: FlutterPluginRegistry) {
DeviceInfoPlusMacosPlugin.register(with: registry.registrar(forPlugin: "DeviceInfoPlusMacosPlugin")) DeviceInfoPlusMacosPlugin.register(with: registry.registrar(forPlugin: "DeviceInfoPlusMacosPlugin"))
FileSelectorPlugin.register(with: registry.registrar(forPlugin: "FileSelectorPlugin"))
FLTFirebaseCorePlugin.register(with: registry.registrar(forPlugin: "FLTFirebaseCorePlugin")) FLTFirebaseCorePlugin.register(with: registry.registrar(forPlugin: "FLTFirebaseCorePlugin"))
FlutterWebRTCPlugin.register(with: registry.registrar(forPlugin: "FlutterWebRTCPlugin")) FlutterWebRTCPlugin.register(with: registry.registrar(forPlugin: "FlutterWebRTCPlugin"))
FPPPackageInfoPlusPlugin.register(with: registry.registrar(forPlugin: "FPPPackageInfoPlusPlugin")) FPPPackageInfoPlusPlugin.register(with: registry.registrar(forPlugin: "FPPPackageInfoPlusPlugin"))
......
...@@ -97,6 +97,14 @@ packages: ...@@ -97,6 +97,14 @@ packages:
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "3.1.1" version: "3.1.1"
cross_file:
dependency: transitive
description:
name: cross_file
sha256: "445db18de832dba8d851e287aff8ccf169bed30d2e94243cb54c7d2f1ed2142c"
url: "https://pub.dev"
source: hosted
version: "0.3.3+6"
crypto: crypto:
dependency: transitive dependency: transitive
description: description:
...@@ -193,6 +201,38 @@ packages: ...@@ -193,6 +201,38 @@ packages:
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "7.0.0" version: "7.0.0"
file_selector_linux:
dependency: transitive
description:
name: file_selector_linux
sha256: "045d372bf19b02aeb69cacf8b4009555fb5f6f0b7ad8016e5f46dd1387ddd492"
url: "https://pub.dev"
source: hosted
version: "0.9.2+1"
file_selector_macos:
dependency: transitive
description:
name: file_selector_macos
sha256: b15c3da8bd4908b9918111fa486903f5808e388b8d1c559949f584725a6594d6
url: "https://pub.dev"
source: hosted
version: "0.9.3+3"
file_selector_platform_interface:
dependency: transitive
description:
name: file_selector_platform_interface
sha256: "0aa47a725c346825a2bd396343ce63ac00bda6eff2fbc43eabe99737dede8262"
url: "https://pub.dev"
source: hosted
version: "2.6.1"
file_selector_windows:
dependency: transitive
description:
name: file_selector_windows
sha256: d3547240c20cabf205c7c7f01a50ecdbc413755814d6677f3cb366f04abcead0
url: "https://pub.dev"
source: hosted
version: "0.9.3+1"
firebase_core: firebase_core:
dependency: "direct main" dependency: "direct main"
description: description:
...@@ -246,6 +286,14 @@ packages: ...@@ -246,6 +286,14 @@ packages:
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "2.0.3" version: "2.0.3"
flutter_plugin_android_lifecycle:
dependency: transitive
description:
name: flutter_plugin_android_lifecycle
sha256: b068ffc46f82a55844acfa4fdbb61fad72fa2aef0905548419d97f0f95c456da
url: "https://pub.dev"
source: hosted
version: "2.0.17"
flutter_speed_dial: flutter_speed_dial:
dependency: "direct main" dependency: "direct main"
description: description:
...@@ -312,6 +360,70 @@ packages: ...@@ -312,6 +360,70 @@ packages:
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "4.1.3" version: "4.1.3"
image_picker:
dependency: "direct main"
description:
name: image_picker
sha256: "7d7f2768df2a8b0a3cefa5ef4f84636121987d403130e70b17ef7e2cf650ba84"
url: "https://pub.dev"
source: hosted
version: "1.0.4"
image_picker_android:
dependency: transitive
description:
name: image_picker_android
sha256: d6a6e78821086b0b737009b09363018309bbc6de3fd88cc5c26bc2bb44a4957f
url: "https://pub.dev"
source: hosted
version: "0.8.8+2"
image_picker_for_web:
dependency: transitive
description:
name: image_picker_for_web
sha256: "50bc9ae6a77eea3a8b11af5eb6c661eeb858fdd2f734c2a4fd17086922347ef7"
url: "https://pub.dev"
source: hosted
version: "3.0.1"
image_picker_ios:
dependency: transitive
description:
name: image_picker_ios
sha256: "76ec722aeea419d03aa915c2c96bf5b47214b053899088c9abb4086ceecf97a7"
url: "https://pub.dev"
source: hosted
version: "0.8.8+4"
image_picker_linux:
dependency: transitive
description:
name: image_picker_linux
sha256: "4ed1d9bb36f7cd60aa6e6cd479779cc56a4cb4e4de8f49d487b1aaad831300fa"
url: "https://pub.dev"
source: hosted
version: "0.2.1+1"
image_picker_macos:
dependency: transitive
description:
name: image_picker_macos
sha256: "3f5ad1e8112a9a6111c46d0b57a7be2286a9a07fc6e1976fdf5be2bd31d4ff62"
url: "https://pub.dev"
source: hosted
version: "0.2.1+1"
image_picker_platform_interface:
dependency: transitive
description:
name: image_picker_platform_interface
sha256: ed9b00e63977c93b0d2d2b343685bed9c324534ba5abafbb3dfbd6a780b1b514
url: "https://pub.dev"
source: hosted
version: "2.9.1"
image_picker_windows:
dependency: transitive
description:
name: image_picker_windows
sha256: "6ad07afc4eb1bc25f3a01084d28520496c4a3bb0cb13685435838167c9dcedeb"
url: "https://pub.dev"
source: hosted
version: "0.2.1+1"
intl: intl:
dependency: transitive dependency: transitive
description: description:
......
...@@ -51,6 +51,7 @@ dependencies: ...@@ -51,6 +51,7 @@ dependencies:
equatable: ^2.0.5 equatable: ^2.0.5
lottie: ^2.4.0 lottie: ^2.4.0
curved_navigation_bar: ^1.0.3 curved_navigation_bar: ^1.0.3
image_picker: ^1.0.4
dev_dependencies: dev_dependencies:
flutter_test: flutter_test:
......
...@@ -6,12 +6,15 @@ ...@@ -6,12 +6,15 @@
#include "generated_plugin_registrant.h" #include "generated_plugin_registrant.h"
#include <file_selector_windows/file_selector_windows.h>
#include <firebase_core/firebase_core_plugin_c_api.h> #include <firebase_core/firebase_core_plugin_c_api.h>
#include <flutter_webrtc/flutter_web_r_t_c_plugin.h> #include <flutter_webrtc/flutter_web_r_t_c_plugin.h>
#include <permission_handler_windows/permission_handler_windows_plugin.h> #include <permission_handler_windows/permission_handler_windows_plugin.h>
#include <url_launcher_windows/url_launcher_windows.h> #include <url_launcher_windows/url_launcher_windows.h>
void RegisterPlugins(flutter::PluginRegistry* registry) { void RegisterPlugins(flutter::PluginRegistry* registry) {
FileSelectorWindowsRegisterWithRegistrar(
registry->GetRegistrarForPlugin("FileSelectorWindows"));
FirebaseCorePluginCApiRegisterWithRegistrar( FirebaseCorePluginCApiRegisterWithRegistrar(
registry->GetRegistrarForPlugin("FirebaseCorePluginCApi")); registry->GetRegistrarForPlugin("FirebaseCorePluginCApi"));
FlutterWebRTCPluginRegisterWithRegistrar( FlutterWebRTCPluginRegisterWithRegistrar(
......
...@@ -3,6 +3,7 @@ ...@@ -3,6 +3,7 @@
# #
list(APPEND FLUTTER_PLUGIN_LIST list(APPEND FLUTTER_PLUGIN_LIST
file_selector_windows
firebase_core firebase_core
flutter_webrtc flutter_webrtc
permission_handler_windows permission_handler_windows
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment