我使用 flutter 和我自己的服务器作为数据库后端制作了一个聊天应用程序。
我想添加端到端加密,类似于 WhatsApp 等其他聊天应用程序,但我对此并不完全了解。
所以我想问的是:
我用条子做了一些类似的事情
import 'package:flutter/material.dart';
class ProfilePage extends StatefulWidget {
@override
_ProfilePageState createState() => _ProfilePageState();
}
class _ProfilePageState extends State<ProfilePage> {
@override
Widget build(BuildContext context) {
return Scaffold(
body: SafeArea(
child: DefaultTabController(
length: 4,
child: NestedScrollView(
body: TabBarView(children: [
//pages of tabBar
]),
headerSliverBuilder: (BuildContext context, bool innerBoxIsScrolled) {
return [
SliverAppBar(
//for the pinned appBar
elevation: 0.0,
backgroundColor: Colors.red,
leading: Padding(
padding: const EdgeInsets.all(8.0),
child: CircleAvatar(backgroundColor: Colors.red.withOpacity(0.4),
child: Icon(Icons.arrow_back,color: Colors.white,),
),
),
pinned: true,
flexibleSpace: FlexibleSpaceBar(
background: Image.network(
"https://images.pexels.com/photos/396547/pexels-photo-396547.jpeg?auto=compress&cs=tinysrgb&h=350",
fit: …Run Code Online (Sandbox Code Playgroud) 我在 Flutter 中创建了一个应用程序,后端在节点 js 中,MongoDB 托管在我的 AWS 服务器上。对于聊天和通知,我使用的是 io 套接字。我想实现推送通知。
即使在强制关闭后,我也想像 WhatsApp 和 Gmail 一样收到推送通知?
我知道有用于推送通知的 FCM(firebase 云消息传递),但是没有它可以做到这一点,因为我所做的一切都没有实现 firebase 和使用 IO 套接字和我自己的数据库。如何实现这一点,在颤振中使用 IO 套接字?还是只能使用 FCM 来完成?
我用一个带有一侧边框的容器做了一些事情
Container(
child:(content goes here....)
margin: EdgeInsets.symmetric(horizontal:16+20.0),
decoration: BoxDecoration(
border: Border(
left: BorderSide(width: 2.0, color: Colors.lightBlue.shade600),
),
color: Colors.white,
),
)
Run Code Online (Sandbox Code Playgroud)
但问题是线的角(顶部和底部)不是圆角的。
我想在帖子的左侧画一条垂直线,右侧是内容。