我有一些填充一个div和我使用background-clip: content-box到应用background-color。这就像一个魅力,但当我尝试应用时问题就出现了box-shadow:
有可能说服这两个属性吗?我也想做“box-shadow-clip:content-box”之类的事情。
我的代码ListTiles在同一行中显示 2:
Row(
children: <Widget>[
Flexible(
child: ListTile(
leading: Icon(Icons.call),
title: TextFormField(
controller: _phoneNumberController,
keyboardType: TextInputType.phone,
decoration: InputDecoration(
hintText: translate('contact_list.number')),
validator: (value) {
return Helpers.checkInput(value);
},
),
),
),
Expanded(
child: ListTile(
title: TextFormField(
controller: _phoneNumberController,
keyboardType: TextInputType.phone,
decoration: InputDecoration(
hintText: translate('contact_list.number')),
validator: (value) {
return Helpers.checkInput(value);
},
),
),
),
],
),
Run Code Online (Sandbox Code Playgroud)
它们都占用 50% 的空间,但我需要第一个占用固定宽度。
我想要存档的是显示输入的电话号码,其电话代码位于左侧(并且需要更小)
拥有类名“class-name-X”(其中 X 可能是 0 到 9 之间的数字),我想为所有这些类创建一个特定的类,例如:
.class-name-{X} {
height: {X} + 'px';
}
Run Code Online (Sandbox Code Playgroud)
那可能吗?我知道使用数组,但这是从 JS 到 HTML 所以在 CSS 上我只得到类名
我可以设置最小高度,如下所示:ListView(shrinkWrap:true,children:listItems.toList(),);
但是我怎样才能有最大高度来显示最多 3 个元素呢?(要查看其余部分,我必须滚动)
我也想将文档的ID另存为一个属性,而不仅仅是作为集合的引用。目前,我这样保存它:
const newSet: AngularFirestoreDocument<SetModel> = this.AngularFirestore.doc('users/' + this.navParams.data.userId);
// adding user to our ddbb
newSet.collection('sets').add(this.set)
.then(function (docRef) {
// ok
})
.catch(function (error) {
// error
});
Run Code Online (Sandbox Code Playgroud)
那可能吗?还是我需要保存它,获取ID并再次更新?
我用这个:
FilteringTextInputFormatter.allow(
RegExp(r'(^\d*\.?\d{0,2})'),
)
Run Code Online (Sandbox Code Playgroud)
它工作正常,但我不能使用逗号,只能使用点。对于某些货币,点用于分隔千位,逗号用于分隔小数。
我怎么能同时接受呢?
我的根文件夹中有一个gitignore,位于 lib、ios、android、build... 文件夹旁边。
在它里面我有一堆被忽略的文件夹,其中一个是build/但每次我做一些更改时,这个文件夹都会再次出现:
修改:build/ios/iphonesimulator/Runner.app/Frameworks/GTMAppAuth.framework/GTMAppAuth 修改:build/ios/iphonesimulator/Runner.app/Frameworks/GTMSessionFetcher.framework/GTMSessionFetcher
我想这与 Flutter 无关,它只是 Git,但这只发生在我的 Flutter 项目中,而不是其他项目中
我想在url上看到实际的路由,但是我无法弄清楚我需要更改的内容。
我在这里关注文档:https : //ionicframework.com/docs/api/navigation/IonicPage/
但是我得到这个错误:
... home.ts有一个@IonicPage装饰器,但是在它没有对应的“ NgModule” ...我在页面顶部有这个:
@IonicPage({
name: 'sums-home',
segment: 'sums-home'
})
Run Code Online (Sandbox Code Playgroud)
我使用以下代码创建了home.module.ts文件:
import { NgModule } from '@angular/core';
Run Code Online (Sandbox Code Playgroud)
从“ ./home”导入{SumsHomePage};从'ionic-angular'导入{IonicPageModule};
import { NgModule } from '@angular/core';
import { SumsHomePage} from './home';
import { IonicPageModule } from 'ionic-angular';
@NgModule({
declarations: [
SumsHomePage
],
imports: [
IonicPageModule.forChild(SumsHomePage),
],
exports: [
SumsHomePage
]
})
export class SumsHomePageModule { }
Run Code Online (Sandbox Code Playgroud)
我去做这个页面:
this.navCtrl.push('sums-home');
Run Code Online (Sandbox Code Playgroud)
但我认为它应该还有其他东西。
有人存档吗?
我有3条路线.当我从第一个移动到第二个时,我需要传递一个参数:
this.navCtrl.push(ReadyPage, { newGame: true });
但是当我从第3个移动到第2个时,我也需要通过这个参数.
我正在尝试这个但不起作用:
this.viewCtrl.dismiss({ newGame: true });
比较这两种方法dismiss似乎并没有这样的选择(除非它被称为data代替params):
abstract push(page: Page | string, params?: any, opts?: NavOptions, done?: TransitionDoneFn): Promise<any>;
dismiss(data?: any, role?: string, navOptions?: NavOptions): Promise<any>;
我有一个包含这些参数的文档:
"rent": "text",
"leases": [
{
"id": 1,
"title": "text",
},
{
"id": 2,
"title": "text",
}
]
Run Code Online (Sandbox Code Playgroud)
我将新元素添加到数组中,如下所示:
.update({'leases': FieldValue.arrayUnion([newLease])});
Run Code Online (Sandbox Code Playgroud)
但我怎样才能只更新 id 2 呢?
我使用 google_sign_in 和 firebase_auth。这在模拟器中工作得很好,在编译 apk 并直接在真实设备上尝试时也工作得很好,但是当我将其发布到 Google Play 并从中安装我的应用程序时,它就不起作用了。
我没有收到任何错误。出现登录信息,当我单击其中一个帐户时,它会关闭而不执行任何操作。
从 Google 获取凭据后,我使用 Firebase 登录以获取该用户的真实数据:
Future googleSignIn(BuildContext context,
[String? email, facebookCredential]) async {
try {
GoogleSignInAccount googleUser;
dynamic popup = await _googleSignIn.signIn();
// cancelled login
if (popup == null) {
return null;
}
googleUser = popup;
GoogleSignInAuthentication googleAuth = await googleUser.authentication;
final AuthCredential credential = GoogleAuthProvider.credential(
accessToken: googleAuth.accessToken,
idToken: googleAuth.idToken,
);
await _firebaseCredential(context, credential);
} catch (error) {
return null;
}
}
_firebaseCredential(BuildContext context, credential) async {
User user = …Run Code Online (Sandbox Code Playgroud) firebase firebase-authentication google-signin flutter flutter-dependencies